Commit Graph

14390 Commits

Author SHA1 Message Date
Florian Bruhin
26a622c46d Disable wrong inconsistent-return-statements 2017-12-15 16:33:47 +01:00
Florian Bruhin
f4ed31b295 Add an utils.Unreachable exception 2017-12-15 16:33:47 +01:00
Florian Bruhin
016fc0ebb1 Fix some inconsistent returns 2017-12-15 16:33:47 +01:00
Florian Bruhin
97a4e8d847 Rewrite error handling in hist_importer script
Raise an exception instead of calling sys.exit
2017-12-15 16:33:47 +01:00
Florian Bruhin
1a4a9b4392 Declare *args before keyword arguments
See https://pylint.readthedocs.io/en/latest/whatsnew/1.8.html
2017-12-15 16:33:47 +01:00
Florian Bruhin
fc987ea9c0 Make message.confirm_async keyword-only 2017-12-15 14:49:49 +01:00
Florian Bruhin
79717528ec Fix exception message formatting 2017-12-15 14:42:37 +01:00
Florian Bruhin
7cebd95936 Simplify test_getitem 2017-12-15 14:41:38 +01:00
Florian Bruhin
bb44f1d4cc Remove old pylint disables 2017-12-15 14:39:42 +01:00
Florian Bruhin
e76732693c Fix wrong import order 2017-12-15 14:35:07 +01:00
Florian Bruhin
a4101662b2 pylint: Disable logging-not-lazy
We log to RAM anyways
2017-12-15 14:29:50 +01:00
Florian Bruhin
3f9ded3bed Add missing docstrings 2017-12-15 13:55:06 +01:00
Florian Bruhin
03a339b93a Update pylint 2017-12-15 13:42:54 +01:00
Florian Bruhin
8173a48b8a Don't access stale settings object after hinting
When QtWebEngine shuts down, it calls pending callbacks, which means we access
an invalid 'settings' object when that happens. The stack would look something
like this:

0  QtWebEngineCore::WebEngineSettings::setAttribute(QtWebEngineCore::WebEngineSettings::Attribute, bool)
12 QtWebEngineCore::CallbackDirectory::invokeEmptyInternal<QVariant const&>(QtWebEnginePrivate::QWebEngineCallbackPrivateBase<QVariant const&>*)
14 QtWebEngineCore::CallbackDirectory::~CallbackDirectory()
19 QWebEnginePage::~QWebEnginePage()

If we instead get the settings from the view freshly, we get a RuntimeError from
PyQt telling us that it's dead. Not sure why it doesn't know about settings
being dead...

With that, we'd get a RuntimeError, which we can simply ignore as it doesn't
matter anyways if the tab is gone.

Fixes #3399
2017-12-14 22:56:44 +01:00
Florian Bruhin
76db8d6f81 Make webelem.OrphanedError subclass of webelem.Error
This means something like this:

  :hint ;; later 20 follow-hint a ;; later 20 tab-close

Won't crash anymore, as the webelem.Error will be shown in the statusbar.
2017-12-14 22:43:19 +01:00
Florian Bruhin
dc1d5036b6 Simplify scrollbar width calculation
This gives us slightly different values it seems, but I think they are more
correct (and don't need the "+ 5" above).

Taking the width directly (not the sizeHint width) returned values like 100 or
so when the scrollbar wasn't shown yet, so that seems wrong.
2017-12-14 09:39:07 +01:00
Florian Bruhin
58043b5653 Always subtract scroll bar width from completion view
The situation where there's no scroll bar at the point the column widths are
calculated is a very rare one. What happens more often is that the scroll bar
disappears due to filtering, in which case we didn't recalculate the column
widths anyways.

Furthermore, we can even go wrong with this calculation, when we calculate the
column widths while the entire completion is invisible - then the scroll bar
won't be visible either, and we won't subtract the space needed for it.

Let's not try to optimize for this uncommon case, and just always subtract the
scrollbar, even if it's not there initially.

Fixes #3359
Closes #3389
2017-12-14 09:13:34 +01:00
Florian Bruhin
f0ad24b08a Remove long deprecated :download invocation 2017-12-14 09:06:46 +01:00
Florian Bruhin
dce4c68827 Update docs 2017-12-14 09:03:51 +01:00
Florian Bruhin
43588b2818 Merge remote-tracking branch 'origin/pr/3393' 2017-12-14 09:02:31 +01:00
Florian Bruhin
5620acb81f Update Debian install instructions
[ci skip]
2017-12-14 08:59:54 +01:00
Florian Bruhin
ac7b56b2b8 Merge remote-tracking branch 'origin/pr/3392' 2017-12-13 23:05:40 +01:00
Florian Bruhin
7a3554e77a Stabilize :session-save --quiet test
By adding a way to check for the loglevel, we can easily check there's no
message but still wait for the session to be saved.
2017-12-13 23:02:44 +01:00
Florian Bruhin
f34bdfbb50 Revert "Remove :session-save --quiet test"
This reverts commit bea71ed3a2.
I think I can think of a way to stabilize it now.
2017-12-13 22:46:38 +01:00
Ryan Roden-Corrent
12112e0fc7 Implement command-accept --rapid.
command-accept --rapid will run the command without clearing the prompt,
allowing "rapid fire" commands. For example, one could open completion
for `open -t` and open several tabs in a row.

The default binding is ctrl+enter.

Resolves #588.
2017-12-13 16:30:42 -05:00
Florian Bruhin
0a612db733 Rename/move encoding test 2017-12-13 21:13:47 +01:00
Florian Bruhin
ddcdfa54aa Fix test for invalid guiprocess encoding 2017-12-13 21:12:56 +01:00
Kevin Velghe
cc4e8c1aae fix password_fill using libsecret 2017-12-13 21:06:09 +01:00
Florian Bruhin
922b1e8f10 Use system locale to decode subprocess output 2017-12-13 20:09:56 +01:00
Florian Bruhin
07d07c7fae Update changelog 2017-12-13 20:06:43 +01:00
Florian Bruhin
2b3250144b Merge remote-tracking branch 'origin/pr/3388' 2017-12-13 20:06:00 +01:00
Florian Bruhin
cdb90cbee7 Regenerate docs 2017-12-13 19:59:54 +01:00
Florian Bruhin
afb0807064 Update changelog 2017-12-13 19:58:01 +01:00
Florian Bruhin
f32b4d88ba Merge remote-tracking branch 'origin/pr/3385' 2017-12-13 19:56:53 +01:00
George Edward Bulmer
84e0ce757a Fix erroneous docstring in a recently added test. 2017-12-13 14:50:25 +00:00
Ryan Roden-Corrent
6420037dd9 Fix histcategory query reuse logic.
I mistakenly checked the length of wheres instead of words. This fixes
that check, renames 'wheres' to 'where_clause' to be clear
that it is a string and not an array, and adds a test.
2017-12-13 08:39:34 -05:00
Ryan Roden-Corrent
2e36e5151e Fix comment in histcategory. 2017-12-13 08:21:48 -05:00
George Edward Bulmer
28961ab177 Add a test with invalid unicode in spawned stdout.
stderr features identical behaviour, so is currently untested.
2017-12-13 12:46:46 +00:00
Florian Bruhin
4caf2fd8b7 Update changelog 2017-12-13 09:27:25 +01:00
Florian Bruhin
c8aef015b0 Merge remote-tracking branch 'origin/pr/3201' 2017-12-13 09:22:36 +01:00
Florian Bruhin
31e3356d01 Merge remote-tracking branch 'origin/pr/3382' 2017-12-13 08:43:21 +01:00
Florian Bruhin
bea71ed3a2 Remove :session-save --quiet test
When nothing gets logged, we can't check whether the session was already saved.
2017-12-13 08:41:29 +01:00
Ryan Roden-Corrent
ae294e92ad Remove unused re import 2017-12-12 20:27:06 -05:00
Ryan Roden-Corrent
8358c76f86 Fix casing of LIKE in comment 2017-12-12 20:26:30 -05:00
Ryan Roden-Corrent
158cfa1194 Clean up "any order" SQL query code.
- Replace a list with a generator
- Add commments to the less obvious parts
- Simplify the binding variable names
2017-12-12 17:28:38 -05:00
George Edward Bulmer
16a9948759 Replace malformed utf-8 characters in spawn output.
Previously this simply crashed if there was ever malformed utf-8 in the
stderr or stdout streams, perhaps as a result of an incorrectly spawned
command. See e.g. #3222
2017-12-12 22:23:33 +00:00
Florian Bruhin
19596e3104 Make qute://log lines darker 2017-12-12 22:52:35 +01:00
George Edward Bulmer
4844a68bfc Change a rogue re.fullmatch into a re.search.
Sometimes tests were timing out. Perhaps with fullmatch these tests were
rarely failing to parse the logs for the information.
2017-12-12 21:42:10 +00:00
Justin Partain
8f5394934f Fix bad merge when rebasing incremental_search feature 2017-12-12 11:32:52 -05:00
Justin Partain
aff6510e35 Refactor _incremental_search() based on PR review 2017-12-12 11:31:28 -05:00