Commit Graph

8226 Commits

Author SHA1 Message Date
Marc Jauvin
def2920a35 fix line length 2018-01-31 18:05:14 -05:00
Florian Bruhin
79935e048c Break long line 2018-01-31 22:35:03 +01:00
lufte
d8510e61aa Use the instance attribute instead of querying the registry 2018-01-30 19:26:45 -03:00
Florian Bruhin
fb5d0f7e14
Merge pull request #3540 from mjauvin/system-proxy
document proxy environment variable for system proxy
2018-01-30 15:56:53 +01:00
Marc Jauvin
b55ae02eda document proxy environment variable for system proxy 2018-01-30 09:48:52 -05:00
Florian Bruhin
400e1bc7d7 Show tab titles as tooltip
Closes #3535
2018-01-30 07:11:48 +01:00
Ryan Roden-Corrent
e9023ce233 Remove newline in editor.py 2018-01-29 07:50:32 -05:00
Marc Jauvin
1a2ab0ffe7 add back rl-yank key binding; use alt-y for prompt-yank. 2018-01-28 10:28:11 -05:00
Florian Bruhin
d01a0b1d64 Fix :bookmark-add with no URL 2018-01-28 13:05:49 +01:00
Ryan Roden-Corrent
530a1859a3 Trigger editor signal on exit if content changed.
With the previous code, the editor could miss the final signal on a
save-and-exit. This is avoided by always running the file changed
handler on a successful exit, but only firing the signal if the content
actually changed (to avoid double-signalling).
2018-01-27 15:03:18 -05:00
Ryan Roden-Corrent
a940de3717 Rename editing_finished to file_updated.
ExternalEditor now fires an event on save rather than on exit, so the
signal name should be updated to match the behavior.
2018-01-27 15:03:18 -05:00
Ryan Roden-Corrent
23eb6a6c53 Fix test_editor for edit-on-write behavior.
Now that the editor fires editing_finished on every write, the unit
tests had to be updated.

- Add qtbot to the editor fixture to resolve `QtWarningMsg:
  QSocketNotifier: Can only be used with threads started with QThread`
- Use removePaths instead of disconnect to stop the watcher from
  signalling. This avoids an error when the editor is forcibly cleaned
  up by the tests without the signal ever being connected, but otherwise
  has the same behavior as disconnecting the singal.
- wait for a signal on write instead of proc closed
- wait for _watcher.fileChanged in test_unreadable to ensure the write
  event is fired before the test exits.
2018-01-27 15:03:18 -05:00
Ryan Roden-Corrent
8a9b98c2dc Editor triggers update on every save.
For any command that spawns an editor, tirgger an update on save, not
just on exit.

- :open-editor writes the text field on save
- :edit-url navigates on save
- :edit-url -t opens a new tab on each save
- :edit-command updates the statusbar text on save
- :edit-command --run runs a command on each save
- :config-edit reloads the config on save

Resolves #2307.
Helps mitigate #1596 by allowing users to 'save' partial work, and
notice if there was an error without closing the editor.
2018-01-27 15:03:18 -05:00
Marc Jauvin
fe4dd579f9 add --sel option to prompt-yank 2018-01-26 22:06:05 -05:00
Florian Bruhin
24cc54a574 Simplify initializing of AbstractTab subclasses
If we already pass the tab object, no need to pass the window ID separately.
2018-01-26 09:47:26 +01:00
Florian Bruhin
677e188894 Update docs 2018-01-26 09:37:35 +01:00
Florian Bruhin
125b3c1de9 Merge remote-tracking branch 'origin/pr/3521' 2018-01-26 09:25:50 +01:00
Marc Jauvin
d2287b7a2e move backend specific code out of AbstractTab into respective backend
classes.
2018-01-25 22:38:25 -05:00
Marc Jauvin
ddcc960aa5 url arg was a string 2018-01-25 22:01:18 -05:00
Marc Jauvin
88ff0c0425 url_str -> urlstr: urlstr used accross the codebase, more consistent 2018-01-25 18:01:43 -05:00
Marc Jauvin
520b473350 modify Question.yank_text to Question.url
error out when question.url is None
add url to yesno prompts
add default binding in prompt mode (ctrl-y)
2018-01-25 17:48:45 -05:00
Marc Jauvin
bb8bc7ea3c fix test related to view-source
remove pygment title
remove view-source from history
2018-01-25 15:17:03 -05:00
Marc Jauvin
eb888cc8d7 fix latest change requests 2018-01-25 13:35:23 -05:00
Florian Bruhin
40df5baa83 Merge remote-tracking branch 'origin/pr/3515' 2018-01-25 09:04:44 +01:00
Florian Bruhin
54e9edfd60 Merge remote-tracking branch 'origin/pr/3515' 2018-01-25 09:02:20 +01:00
Marc Jauvin
3b1fb92b11 remove extra line to satisfy flake8 2018-01-24 19:13:28 -05:00
Marc Jauvin
d77c9ae009 Add prompt-yank command
add yank_text property to utils.usertypes.Question class

Resolves #2591
2018-01-24 18:53:06 -05:00
Marc Jauvin
d7c51f7fc4 implement requested changes for PR #3521. 2018-01-24 18:04:05 -05:00
Daniel Hahler
4f04c776c1 fixup! fixup! incdec_number: add support for port 2018-01-24 22:22:00 +01:00
Florian Bruhin
961eebaf71 Merge remote-tracking branch 'origin/pr/3510' 2018-01-24 21:33:04 +01:00
Florian Bruhin
582236e42b Merge remote-tracking branch 'origin/pr/3509' 2018-01-24 21:28:58 +01:00
Florian Bruhin
e5b6ccd716 Merge remote-tracking branch 'origin/pr/3506' 2018-01-24 21:14:25 +01:00
Florian Bruhin
caca3614f8 Merge remote-tracking branch 'origin/pr/3443' 2018-01-24 20:36:15 +01:00
Marc Jauvin
2e912eeadf move backend dependent code to AbstractAction respective classes 2018-01-23 23:30:22 -05:00
Marc Jauvin
83515628a8 fix line indentation warning 2018-01-23 10:11:34 -05:00
Marc Jauvin
56e6864159 Inject qutebrowser's JS files at DocumentReady
Use WebEngine's view-source: scheme for "view-source" command.
Also add missing URL when viewing source for WebKit.

Resolves #3490
Resolves #2395
Resolves #2948
2018-01-23 10:03:04 -05:00
Daniel Hahler
9f14ae184f fixup! incdec_number: add support for port 2018-01-22 21:48:21 +01:00
Daniel Hahler
6a40cbf160 incdec_number: add support for port 2018-01-22 21:26:46 +01:00
Simon Doppler
02396cb455 Remove useless function 2018-01-22 16:12:45 +01:00
Simon Doppler
f11d7ab489 Check if the window still exists 2018-01-22 16:11:59 +01:00
Simon Doppler
ab9f17b053 Use default value for dictionary item in tabs handler 2018-01-22 16:08:30 +01:00
Ryan Roden-Corrent
1e9a70855d Show '&' properly in completion widget.
When highlighting the matched part of the text, we need to html-escape
the pattern used to find the matching text so it will replace terms that
have been escaped in the text, like &.

Resolves #3508.
2018-01-21 07:46:53 -05:00
Ryan Roden-Corrent
9d5beff937 Set some PRAGMAs to optimize the history database.
Enable write-ahead-logging and reduce the synchronous level to NORMAL.
This should reduce the number of writes to disk and avoid some of the
hangs users are experiencing.

Resolves #3507.
Resolves #2930 (optimistically, reopen if not fixed).

See https://sqlite.org/pragma.html and https://www.sqlite.org/wal.html.
2018-01-20 15:49:52 -05:00
Florian Bruhin
d62cb58f7d Release v1.1.1
(cherry picked from commit 4e8abaa2d16103f42cb26919e50d59937a88ae8f)
2018-01-20 19:21:40 +01:00
Florian Bruhin
748de85ba2 Fix crash when getting signals for closed tabs
Fixes #3498
2018-01-20 18:50:17 +01:00
Florian Bruhin
1f5cbf21a3 Merge remote-tracking branch 'origin/pr/3348' 2018-01-20 18:28:14 +01:00
Florian Bruhin
182bf1d688
Simplify platform handling 2018-01-20 16:43:39 +01:00
Jimmy
aebc1a7d48 Greasemonkey: don't complain about an unset run-at
Apparently is is not an unusual situation to leave it unset and rely on
the default. Logging a warning about this could be unnecerasily
confusing for users.

I'm leaving the log message in there if it is set to something weird
like `window-load` or `document-complete` which scriptish may support.
2018-01-20 13:40:53 +13:00
Jimmy
d5d22783ea Greasemonkey: optimize pattern matching a little
Moving `QUrl.toString()` out of the `_match()` function which is called
for every pattern in every stript seems to make it ~40% faster.
2018-01-20 13:40:53 +13:00
Jimmy
971b413991 Greasemonkey: make *clude regexes case insensitive
Sometimes I don't read specs so good.
2018-01-20 13:40:47 +13:00
Jimmy
b2f95339ce Greasemonkey: support regexes in @include and @exclude.
Like the spec says, if a value for the @include or @exclude rules starts
and ends with a '/' it should be parsed as a regular expression.
Technically a ECMAScript syntax regular expression, but I am not sure of
the differences and I assume they are far fewer than the similarities.
One that I did see mentioned was that javascript RegExp doesn't support
unicode. Although it apparently does support a 'u' flag now.

Note that code will only be ran for QtWebkit and QWebEngine < 5.8
we rely on the builtin support for metadata it QWebEngine for most
things greasemonkey related. Sadly it seems that they missed the regex
requirement too. I've opened a ticket to track that https://bugreports.qt.io/browse/QTBUG-65484
2018-01-20 13:39:19 +13:00
Jay Kamat
968367b042
Simplify logic for checking if an element is a frame 2018-01-19 15:25:03 -05:00
Artur Shaikhullin
1e3f11ca13 Fix eslint warnings 2018-01-19 23:17:03 +06:00
Artur Shaikhullin
22d77fadd7 Eliminate caret blinking 2018-01-19 22:40:47 +06:00
Artur Shaikhullin
2d2d71512f Add initial comment 2018-01-19 22:31:12 +06:00
Artur Shaikhullin
79766aa65b Add chromium license 2018-01-19 22:28:49 +06:00
Artur Shaikhullin
6eb001fc34 Rename js caret file 2018-01-19 22:24:11 +06:00
Artur Shaikhullin
859469c600 Remove redundancy comment 2018-01-19 22:15:54 +06:00
Artur Shaikhullin
4fde8ff204 Add separate function in js to set current platform 2018-01-19 22:14:01 +06:00
Marc Jauvin
4a4a6549d0 use a temporary attribute of the class to prevent the loop; tested to work in both backends 2018-01-19 09:34:45 -05:00
Marc Jauvin
9e258a490e might as well use the same loop prevention mechanism for both backends 2018-01-19 06:59:40 -05:00
Argn0
bd7054fa2e use self.delete and add test 2018-01-19 09:29:37 +01:00
Argn0
aeb7bac886 added :session-load --delete 2018-01-19 02:33:42 +01:00
Marc Jauvin
a2ca59b822 add netrc support for webengine. resolves #2785. 2018-01-18 18:06:47 -05:00
Florian Bruhin
cb2cd615e0 Update docs 2018-01-18 07:57:31 +01:00
Florian Bruhin
380021e818 Merge remote-tracking branch 'origin/pr/3484' 2018-01-18 07:54:42 +01:00
Jay Kamat
12d729c3bc
Merge remote-tracking branch 'upstream/master' into jay/frame-hinting 2018-01-17 17:24:43 -05:00
Jay Kamat
ffda82170d
Fix several style issues 2018-01-17 17:02:53 -05:00
Marc Jauvin
72c97ca846 sort modes, "normal" mode first 2018-01-17 14:25:07 -05:00
Jay Kamat
c5e688f26c
Stop iterating over every frame to check if element is frame 2018-01-17 13:08:04 -05:00
Marc Jauvin
5db4493667 @The-Compiler requested changes addressed. 2018-01-17 10:11:32 -05:00
Florian Bruhin
b3ebcfd394 Merge remote-tracking branch 'origin/pr/3482' 2018-01-17 15:53:47 +01:00
Florian Bruhin
923785c781 Merge remote-tracking branch 'origin/pr/3467' 2018-01-17 14:41:45 +01:00
Florian Bruhin
a1798b3843 Merge remote-tracking branch 'origin/pr/3474' 2018-01-17 13:38:22 +01:00
Florian Bruhin
4acb63ca49 Merge remote-tracking branch 'origin/pr/3478' 2018-01-17 13:23:31 +01:00
Marc Jauvin
e25a33790f remove blank line to satisfy flake8 2018-01-15 20:44:56 -05:00
Marc Jauvin
fb0a418d0a use url even if we do not need it 2018-01-15 16:03:22 -05:00
Marc Jauvin
528b48dab6 fix line too 2018-01-15 15:51:14 -05:00
Marc Jauvin
9b473093b1 silence pylint warning 2018-01-15 15:45:29 -05:00
Marc Jauvin
f6cfb0c529 add missing super() call 2018-01-15 15:44:21 -05:00
Florian Bruhin
fbbb9ae940 Release v1.1.0 2018-01-15 19:39:16 +01:00
Florian Bruhin
8c8cb3bc29 Fix crash when clicking <form> element with name="value" child
https://stackoverflow.com/q/22942689/2085149

Fixes #2877
See #2569
2018-01-14 20:20:51 +01:00
Nemanja Nedeljkovic
8d8566a5ab Merge branch 'master' of github.com:qutebrowser/qutebrowser into angular-hints 2018-01-13 23:18:39 +01:00
Marc Jauvin
a2cdb2e4db Merge branch 'patch-issue#24' of https://github.com/mjauvin/qutebrowser into patch-issue#24 2018-01-13 15:55:05 -05:00
Marc Jauvin
48b6c160f5 improve styling as suggested by @jgkamat 2018-01-13 15:52:49 -05:00
Christian Helbling
cd20c32973 simplify more 2018-01-13 10:48:13 +01:00
Christian Helbling
141d020ede import debug is not needed anymore 2018-01-13 10:47:58 +01:00
Marc Jauvin
4848182204
code cleanup
- move qute_bindings block AFTER qute_settings block
- remove unnecessary variable declaration
2018-01-13 01:39:05 -05:00
Marc Jauvin
1e8694f3cc
remove unused module 2018-01-12 17:35:04 -05:00
Marc Jauvin
3a7ac51a00
html template to render qute://bindings 2018-01-12 17:28:56 -05:00
Marc Jauvin
8940e05baf
bind without agruments shows current bindings 2018-01-12 17:27:44 -05:00
Marc Jauvin
4ae33deebd
add handler for qute://bindings 2018-01-12 17:24:20 -05:00
Christian Helbling
559059d244 simplify code - state_before_fullscreen seems not to be needed anymore 2018-01-12 11:21:55 +01:00
Christian Helbling
699abef159 fix regression of #2778 which reappeared with qt 5.10 in combination with up-to-date KDE
this should also avoid an unneccessary KDE maximize animation when exiting fullscreen into maximized
2018-01-12 10:54:05 +01:00
Argn0
d9741d56c5
removed a trailing whitespace 2018-01-11 16:38:55 +01:00
Argn0
57e8b428c3 e.accept() and return 2018-01-11 15:45:44 +01:00
Argn0
200b36bd36
review 1 2018-01-11 14:09:08 +01:00
Argn0
2d7dd391a3
review 1 2018-01-11 14:08:17 +01:00
Argn0
66d0591684 new method 2018-01-11 14:03:43 +01:00
Argn0
4932323d3b review 1 setText 2018-01-11 12:40:20 +01:00
Argn0
860b22c0e0 review 1 2018-01-10 22:05:14 +01:00
Argn0
9fd2ad9909
review 1 2018-01-10 21:34:19 +01:00
Argn0
1db4309eec review 1 2018-01-10 21:29:31 +01:00
Argn0
be5b8e2632 option to close commandline by deleting the prefix 2018-01-10 20:02:39 +01:00
Argn0
5003432a55 option to close commandline by deleting the prefix 2018-01-10 19:59:34 +01:00
Florian Bruhin
6b9edefb05 Merge remote-tracking branch 'origin/pr/3432' 2018-01-10 09:39:08 +01:00
Florian Bruhin
0518a03b1e Merge remote-tracking branch 'origin/pr/3423' 2018-01-10 09:38:07 +01:00
Simon Doppler
dea0aa9f7c
Add tabs page 2018-01-08 18:01:42 +01:00
Nemanja Nedeljkovic
5f3ee66775 Code style improvement and documentation 2018-01-07 12:06:36 +01:00
Nemanja Nedeljkovic
957d5b3f02 Add more angular1 selectors 2018-01-07 11:58:02 +01:00
Jay Kamat
8500509532
Implement is_visible for same-origin frames 2018-01-06 11:13:54 -08:00
Nemanja Nedeljković
555f43c854
Add ng-click for hinting to Angular 1.x links 2018-01-06 19:18:17 +01:00
Artur Shaikhullin
aebd59247d Check platform variable 2018-01-06 22:45:53 +06:00
Artur Shaikhullin
c4e50369e7 Enable caret only when mode is 'caret' 2018-01-06 22:43:39 +06:00
Artur Shaikhullin
dc8c919c30 Fix pylint warnings 2018-01-05 22:44:07 +06:00
Artur Shaikhullin
5553e64a75 Restore chrome-caretbrowsing extension comments 2018-01-05 19:21:55 +06:00
Artur Shaikhullin
8268c1d7ff Disable eslint rules globally 2018-01-05 19:02:19 +06:00
Artur Shaikhullin
b6662fd243 Use inner functions for callbacks 2018-01-05 18:35:15 +06:00
Jay Kamat
3d508be9ff
Clear unpinned tabs before prompting user with :tab-only 2018-01-04 18:34:40 -08:00
Ryan Roden-Corrent
c290b3f80f Don't attempt completion if input starts with flag.
Always interpret the first word in the command string as the command to
offer completions for, even if that word looks like a flag.

Fixes #3460, where the command string `:-w open` would attempt to offer
completions for `open` but crash because the parsing was thrown off.
By moving the flag-stripping logic to _after_ we determine the command,
`:-w open` interprets `:-w` as the command. Since that is not a valid
command, we won't offer any completions.
2018-01-04 12:34:06 -05:00
Artur Shaikhullin
695f734142 Extract js call method 2017-12-30 23:46:04 +06:00
Artur Shaikhullin
e22dc1b5c6 Update copyright year 2017-12-30 23:37:57 +06:00
Artur Shaikhullin
fe4eb19ecf Add link to chrome-caretbrowsing extension 2017-12-30 23:37:17 +06:00
Artur Shaikhullin
6dc3108747 Get OS name using python 2017-12-30 23:35:12 +06:00
Artur Shaikhullin
25436e2544 Fix eslint warnings 2017-12-30 09:43:16 +06:00
Florian Bruhin
28889cf099 Use a dict for ModeManager.eventFilter 2017-12-29 20:36:55 +01:00
Florian Bruhin
e7af961be2 Remove filtering of mouse events
This was needed for the hide-mouse-cursor setting. However, this setting was
removed in 2223a285ef, so this code has been dead
since then.
2017-12-29 19:36:52 +01:00
Artur Shaikhullin
e254ea2fa7 Add license and description 2017-12-29 23:43:39 +06:00
Artur Shaikhullin
d04a087c2b Try fix Windows caret issues 2 2017-12-29 20:10:18 +06:00
Artur Shaikhullin
882beab3f2 Try to fix Windows caret ussues 2017-12-29 19:01:12 +06:00
Artur Shaikhullin
db16a87e68 Removed unused import 2017-12-29 18:39:29 +06:00
Artur Shaikhullin
3b836d3483 Fix lint warnings 2017-12-29 17:56:16 +06:00
Artur Shaikhullin
7d181ee4b5 Check if document body exists 2017-12-28 23:04:04 +06:00
Artur Shaik
5605d3cd8e
Merge branch 'master' into webengine_caret 2017-12-28 20:43:31 +06:00
Artur Shaikhullin
63658d3a1e Catch userscript exception and show error message 2017-12-28 20:40:37 +06:00
Artur Shaikhullin
a01566ed15 Fix loosed variable 2017-12-28 19:17:25 +06:00
RyanJenkins
53575aaeed Default raise_windows() alert param to True to preserve existing
behavior
2017-12-27 12:40:55 -08:00
RyanJenkins
9cb25e0c76 Raise browser window after editor closes regardless of outcome of
inserting text and avoid calling QApplication.instance().alert() in this
scenario.
2017-12-26 20:19:39 -08:00
RyanJenkins
d9b00acdc6 Return focus to qutebrowser when external editor finishes. 2017-12-23 23:59:02 -08:00
Ryan Farley
46f6336e6e and add back needed connection 2017-12-22 12:47:38 -06:00
Ryan Farley
1d0b91475d remove broken connection 2017-12-22 12:45:37 -06:00
Ryan Farley
252fbf651f add back blank line for D204 2017-12-22 11:47:13 -06:00
Ryan Farley
f90342741a comma spacing 2017-12-22 11:41:07 -06:00
Ryan Farley
feb327e80e fix style issues, better names, less indirection
Added spaces to comments, use python naming conventions, remove
_load_progress_fake as unnecessary, rename _on_load_*_fake to
_on_load_*_workaround (for less confusion), and use qtutils rather than
QT_VERSION_STR
2017-12-22 11:32:31 -06:00
seebye
125af531cb database qute://back 2017-12-22 15:44:42 +01:00
Ryan Farley
fa10b76ce8 remove extraneous loadStarted connection
Copying and pasting without thinking might lead to redundancy.
2017-12-22 01:27:35 -06:00
Ryan Farley
4a6c9ecc34 only reroute load signals with Qt=5.10
This stops regressions on Qt<=5.9. It also reintroduces #3110, but
fixing #3110 was just a nice side effect rather than the main goal here.
2017-12-21 21:22:20 -06:00
Ryan Farley
d6c56b83a8 fix line length 2017-12-21 16:31:45 -06:00
Ryan Farley
5bfab54828 supplement broken webengine load signals
This uses the much more reliable `loadProgress(100)` in place of
`loadFinished(true)` for WebEngine, with `loadProgressFake` and
`loadFinishedFake` used instead of the 'official' variants.
2017-12-21 15:35:43 -06:00
seebye
801b6b90ce pylint adjustments 2017-12-20 01:15:12 +01:00
seebye
c8ae405bfe fix #3396 2017-12-20 00:10:21 +01:00
Florian Bruhin
f203535e00 Merge remote-tracking branch 'origin/pr/3407' 2017-12-18 16:11:16 +01:00
Ryan Roden-Corrent
ef2de8201a Fix colors.completion.fg default and description.
Update the description to mention the number of columns and change the
default to ["white", "white", "white"] to make it more obvious that
multiple colors can be specified. This also satisfies the config test
that expects the default value for ListOrValue types to be a list.

One other test had to be tweaked to use a config option that is still
just a QtColor rather than a ListOrValue.

While it is possible to provide just two colors, it is "undefined
behavior". It will use the first color as the third color, but that is
an artifact of the implementation and therefore not documented (though
also not an error, as it is harmless).
2017-12-18 08:42:22 -05:00
Jay Kamat
6433096611
Disable max-lines in eslint 2017-12-15 21:30:08 -05:00
Florian Bruhin
d03e314762 Explain eslint philosophy 2017-12-15 23:26:18 +01:00
Florian Bruhin
430126dcc8 pylint: Re-enable ungrouped-imports 2017-12-15 23:08:53 +01:00
Jay Kamat
7f9d4888fd
Fix a couple eslint errors
Restructure serialize_elem into a bunch of smaller functions
2017-12-15 15:55:16 -05:00
Jay Kamat
2898c416aa
Simplify and clean up frame logic 2017-12-15 15:16:18 -05:00
Florian Bruhin
e65c0dd8a7 pylint: Re-enable bad-continuation
And lots and lots of whitespace changes.
2017-12-15 19:16:55 +01:00
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
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
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
3f9ded3bed Add missing docstrings 2017-12-15 13:55:06 +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
43588b2818 Merge remote-tracking branch 'origin/pr/3393' 2017-12-14 09:02:31 +01:00
Ryan Roden-Corrent
57e2d407ce Support different colors per completion column.
Now colors.completion.fg may be set to a list to specify a different
color for each completion column. For example:

:set colors.completion.fg [black,blue,white] will use black text for the
first column, blue for the second, and white for the third.

Setting to a single value still works and behaves as before. The default
is unchanged from 'white'.

Resolves #1794.
2017-12-13 17:03:59 -05: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
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
922b1e8f10 Use system locale to decode subprocess output 2017-12-13 20:09:56 +01:00
Florian Bruhin
2b3250144b Merge remote-tracking branch 'origin/pr/3388' 2017-12-13 20:06:00 +01:00
Florian Bruhin
f32b4d88ba Merge remote-tracking branch 'origin/pr/3385' 2017-12-13 19:56:53 +01: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
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
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
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
Justin Partain
9f511fe18c pylint fix, change if len(text) to if text 2017-12-12 11:31:28 -05:00
Justin Partain
8451899a76 Add block for ignore_case 2017-12-12 11:31:28 -05:00
Justin Partain
4eebd2a85d Create config.search.* group with ignore_case and incremental 2017-12-12 11:31:28 -05:00
Justin Partain
bb2fcddcd4 Update incremental_search PR with changes from review 2017-12-12 11:31:28 -05:00
Justin Partain
77054cc063 Make 'Text not found on page!' warnings replace 2017-12-12 11:31:28 -05:00
Justin Partain
c1094b6660 Feature - incremental_search
Added config option to find on a page incrementally, renewing the search
each time a new character is entered.
2017-12-12 11:31:28 -05:00
George Edward Bulmer
b07a4c8c28 Add explicit left anchor to directory check regex. 2017-12-12 13:25:35 +00:00
George Edward Bulmer
3cf4e8ba67 Merge remote-tracking branch 'upstream/master' into regex-match 2017-12-12 13:22:11 +00:00
Ryan Roden-Corrent
6a20f9d4c9 Cache url query when possible.
We don't need to regenerate a new query every keystroke, but rather
every time the user adds a new word.
2017-12-12 07:37:31 -05:00