diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-01-20 18:10:13 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-01-20 18:18:59 +0100 |
commit | fc87c3df0fd3b4c4a748876b526e6d7f29f70a02 (patch) | |
tree | 1e0ffe4dd7f60e21f3e5423d2af47ea33402f014 | |
parent | c4c370208983fed8f53d82c8492fd97fba987cf6 (diff) | |
download | qutebrowser-fc87c3df0fd3b4c4a748876b526e6d7f29f70a02.tar.gz qutebrowser-fc87c3df0fd3b4c4a748876b526e6d7f29f70a02.zip |
Rename :follow-hint to :hint-follow
See #6022
-rw-r--r-- | doc/changelog.asciidoc | 1 | ||||
-rw-r--r-- | doc/help/commands.asciidoc | 8 | ||||
-rw-r--r-- | doc/help/settings.asciidoc | 2 | ||||
-rw-r--r-- | qutebrowser/browser/hints.py | 4 | ||||
-rw-r--r-- | qutebrowser/config/configdata.yml | 2 | ||||
-rw-r--r-- | tests/end2end/features/conftest.py | 2 | ||||
-rw-r--r-- | tests/end2end/features/downloads.feature | 4 | ||||
-rw-r--r-- | tests/end2end/features/hints.feature | 42 | ||||
-rw-r--r-- | tests/end2end/features/utilcmds.feature | 2 | ||||
-rw-r--r-- | tests/end2end/test_dirbrowser.py | 2 | ||||
-rw-r--r-- | tests/end2end/test_hints_html.py | 4 | ||||
-rw-r--r-- | tests/end2end/test_insert_mode.py | 2 |
12 files changed, 38 insertions, 37 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index afa431250..8a99529cc 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -185,6 +185,7 @@ Changed * `drop-selection` -> `selection-drop` * `reverse-selection` -> `selection-reverse` * `follow-selected` -> `selection-follow` + * `follow-hint` -> `hint-follow` - Various performance improvements, including for the startup time. Fixed diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index b2e284b68..0d77c369b 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -1601,7 +1601,7 @@ How many steps to zoom out. |<<completion-item-del,completion-item-del>>|Delete the current completion item. |<<completion-item-focus,completion-item-focus>>|Shift the focus of the completion menu to another item. |<<completion-item-yank,completion-item-yank>>|Yank the current completion item into the clipboard. -|<<follow-hint,follow-hint>>|Follow a hint. +|<<hint-follow,hint-follow>>|Follow a hint. |<<leave-mode,leave-mode>>|Leave the mode we're currently in. |<<move-to-end-of-document,move-to-end-of-document>>|Move the cursor or selection to the end of the document. |<<move-to-end-of-line,move-to-end-of-line>>|Move the cursor or selection to the end of line. @@ -1685,9 +1685,9 @@ Yank the current completion item into the clipboard. ==== optional arguments * +*-s*+, +*--sel*+: Use the primary selection instead of the clipboard. -[[follow-hint]] -=== follow-hint -Syntax: +:follow-hint [*--select*] ['keystring']+ +[[hint-follow]] +=== hint-follow +Syntax: +:hint-follow [*--select*] ['keystring']+ Follow a hint. diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 085dc3637..4253a18ec 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -529,7 +529,7 @@ Default: * +pass:[<Ctrl-F>]+: +pass:[hint links]+ * +pass:[<Ctrl-R>]+: +pass:[hint --rapid links tab-bg]+ * +pass:[<Escape>]+: +pass:[leave-mode]+ -* +pass:[<Return>]+: +pass:[follow-hint]+ +* +pass:[<Return>]+: +pass:[hint-follow]+ - +pass:[insert]+: * +pass:[<Ctrl-E>]+: +pass:[edit-text]+ diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 0812eda7d..097467788 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -838,7 +838,7 @@ class HintManager(QObject): else: follow = False # save the keystr of the only one visible hint to be picked up - # later by self.follow_hint + # later by self.hint_follow self._context.to_follow = list(visible.keys())[0] if follow: @@ -1001,7 +1001,7 @@ class HintManager(QObject): @cmdutils.register(instance='hintmanager', scope='window', modes=[usertypes.KeyMode.hint]) - def follow_hint(self, select: bool = False, keystring: str = None) -> None: + def hint_follow(self, select: bool = False, keystring: str = None) -> None: """Follow a hint. Args: diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 59a9d6b89..1a1f84e56 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -3393,7 +3393,7 @@ bindings.default: <Shift-Ins>: insert-text -- {primary} <Escape>: leave-mode hint: - <Return>: follow-hint + <Return>: hint-follow <Ctrl-R>: hint --rapid links tab-bg <Ctrl-F>: hint links <Ctrl-B>: hint all tab-bg diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 65f934d9f..5a08d382c 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -381,7 +381,7 @@ def hint_and_follow(quteproc, args, letter): args = args.replace('(python-executable)', sys.executable) quteproc.send_cmd(':hint {}'.format(args)) quteproc.wait_for(message='hints: *') - quteproc.send_cmd(':follow-hint {}'.format(letter)) + quteproc.send_cmd(':hint-follow {}'.format(letter)) @bdd.when("I wait until the scroll position changed") diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index f20377db5..eab4ae747 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -48,7 +48,7 @@ Feature: Downloading things from a website. When I set downloads.location.prompt to true And I open data/downloads/downloads.html And I hint with args "--rapid links download" and follow a - And I run :follow-hint s + And I run :hint-follow s And I wait until the download download.bin is finished And I wait until the download download2.bin is finished Then the downloaded file download.bin should exist @@ -667,7 +667,7 @@ Feature: Downloading things from a website. Scenario: user-agent when using hints When I open / And I run :hint links download - And I run :follow-hint a + And I run :hint-follow a And I wait until the download is finished Then the downloaded file user-agent should contain Safari/ diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature index 271450d90..234450c4c 100644 --- a/tests/end2end/features/hints.feature +++ b/tests/end2end/features/hints.feature @@ -6,11 +6,11 @@ Feature: Using hints Background: Given I clean up open tabs - Scenario: Using :follow-hint outside of hint mode (issue 1105) - When I run :follow-hint - Then the error "follow-hint: This command is only allowed in hint mode, not normal." should be shown + Scenario: Using :hint-follow outside of hint mode (issue 1105) + When I run :hint-follow + Then the error "hint-follow: This command is only allowed in hint mode, not normal." should be shown - Scenario: Using :follow-hint with an invalid index. + Scenario: Using :hint-follow with an invalid index. When I open data/hints/html/simple.html And I hint with args "links normal" and follow xyz Then the error "No hint xyz!" should be shown @@ -26,8 +26,8 @@ Feature: Using hints And I wait for regex "hints: .*|Current tab changed \(\d* -> \d*\) before _start_cb is run\." in the log # 'hints: .*' is logged when _start_cb is called before tab-prev (on # qtwebkit, _start_cb is called synchronously) - And I run :follow-hint a - Then the error "follow-hint: This command is only allowed in hint mode, not normal." should be shown + And I run :hint-follow a + Then the error "hint-follow: This command is only allowed in hint mode, not normal." should be shown ### Opening in current or new tab @@ -138,8 +138,8 @@ Feature: Using hints When I run :debug-set-fake-clipboard And I open data/hints/rapid.html And I hint with args "links yank --rapid" - And I run :follow-hint a - And I run :follow-hint s + And I run :hint-follow a + And I run :hint-follow s And I run :leave-mode Then the clipboard should contain "http://localhost:(port)/data/hello.txt(linesep)http://localhost:(port)/data/hello2.txt" @@ -147,8 +147,8 @@ Feature: Using hints When I open data/hints/rapid.html in a new tab And I run :tab-only And I hint with args "all tab-bg --rapid" - And I run :follow-hint a - And I run :follow-hint s + And I run :hint-follow a + And I run :hint-follow s And I run :leave-mode And I wait until data/hello.txt is loaded And I wait until data/hello2.txt is loaded @@ -167,9 +167,9 @@ Feature: Using hints Scenario: Using hint --rapid to hit multiple buttons When I open data/hints/buttons.html And I hint with args "--rapid" - And I run :follow-hint s - And I run :follow-hint d - And I run :follow-hint f + And I run :hint-follow s + And I run :hint-follow d + And I run :hint-follow f Then the javascript message "beep!" should be logged And the javascript message "bop!" should be logged And the javascript message "boop!" should be logged @@ -254,12 +254,12 @@ Feature: Using hints Then the javascript message "contents: existingnew" should be logged ### iframes - Scenario: Using :follow-hint inside an iframe + Scenario: Using :hint-follow inside an iframe When I open data/hints/iframe.html And I hint with args "links normal" and follow a Then "navigation request: url http://localhost:*/data/hello.txt, type Type.link_clicked, *" should be logged - Scenario: Using :follow-hint inside an iframe button + Scenario: Using :hint-follow inside an iframe button When I open data/hints/iframe_button.html And I hint with args "all normal" and follow s Then "navigation request: url http://localhost:*/data/hello.txt, *" should be logged @@ -273,7 +273,7 @@ Feature: Using hints Then no crash should happen @flaky # FIXME https://github.com/qutebrowser/qutebrowser/issues/1525 - Scenario: Using :follow-hint inside a scrolled iframe + Scenario: Using :hint-follow inside a scrolled iframe When I open data/hints/iframe_scroll.html And I hint with args "all normal" and follow a And I run :scroll bottom @@ -360,7 +360,7 @@ Feature: Using hints And I hint with args "all" And I press the key "s" And I wait for "Filtering hints on 's'" in the log - And I run :follow-hint 1 + And I run :hint-follow 1 Then data/numbers/7.txt should be loaded # https://github.com/qutebrowser/qutebrowser/issues/576 @@ -370,8 +370,8 @@ Feature: Using hints And I set hints.mode to number And I hint with args "all tab-bg --rapid" And I press the key "t" - And I run :follow-hint 0 - And I run :follow-hint 1 + And I run :hint-follow 0 + And I run :hint-follow 1 Then data/numbers/2.txt should be loaded And data/numbers/3.txt should be loaded @@ -383,7 +383,7 @@ Feature: Using hints And I press the key "x" And I press the key "0" And I press the key "<Backspace>" - And I run :follow-hint 11 + And I run :hint-follow 11 Then the error "No hint 11!" should be shown # https://github.com/qutebrowser/qutebrowser/issues/674#issuecomment-165096744 @@ -438,7 +438,7 @@ Feature: Using hints And I hint with args "--mode number all" And I press the key "s" And I wait for "Filtering hints on 's'" in the log - And I run :follow-hint 1 + And I run :hint-follow 1 Then data/numbers/7.txt should be loaded ### hints.leave_on_load diff --git a/tests/end2end/features/utilcmds.feature b/tests/end2end/features/utilcmds.feature index 94db7c403..5dc5c730b 100644 --- a/tests/end2end/features/utilcmds.feature +++ b/tests/end2end/features/utilcmds.feature @@ -141,7 +141,7 @@ Feature: Miscellaneous utility commands exposed to the user. And I run :leave-mode And I run :repeat-command And I wait for "hints: *" in the log - And I run :follow-hint a + And I run :hint-follow a And I wait until data/hello.txt is loaded Then the following tabs should be open: - data/hints/link_blank.html diff --git a/tests/end2end/test_dirbrowser.py b/tests/end2end/test_dirbrowser.py index 8a91fe494..350141f30 100644 --- a/tests/end2end/test_dirbrowser.py +++ b/tests/end2end/test_dirbrowser.py @@ -193,7 +193,7 @@ def test_enter_folder_smoke(dir_layout, quteproc): quteproc.open_url(dir_layout.file_url()) quteproc.send_cmd(':hint all normal') # a is the parent link, s is the first listed folder/file - quteproc.send_cmd(':follow-hint s') + quteproc.send_cmd(':hint-follow s') expected_url = urlutils.file_url(dir_layout.path('folder0')) quteproc.wait_for_load_finished_url(expected_url) page = parse(quteproc) diff --git a/tests/end2end/test_hints_html.py b/tests/end2end/test_hints_html.py index 14868590c..86d46864e 100644 --- a/tests/end2end/test_hints_html.py +++ b/tests/end2end/test_hints_html.py @@ -111,7 +111,7 @@ def test_hints(test_name, zoom_text_only, zoom_level, find_implementation, # follow hint quteproc.send_cmd(':hint all normal') quteproc.wait_for(message='hints: a', category='hints') - quteproc.send_cmd(':follow-hint a') + quteproc.send_cmd(':hint-follow a') quteproc.wait_for_load_finished('data/' + parsed.target) # reset quteproc.send_cmd(':zoom 100') @@ -148,5 +148,5 @@ def test_word_hints_issue1393(quteproc, tmpdir): quteproc.open_path('data/hints/issue1393.html') quteproc.send_cmd(':hint') quteproc.wait_for(message='hints: *', category='hints') - quteproc.send_cmd(':follow-hint {}'.format(hint)) + quteproc.send_cmd(':hint-follow {}'.format(hint)) quteproc.wait_for_load_finished('data/{}'.format(target)) diff --git a/tests/end2end/test_insert_mode.py b/tests/end2end/test_insert_mode.py index eb27b27a6..6bd616259 100644 --- a/tests/end2end/test_insert_mode.py +++ b/tests/end2end/test_insert_mode.py @@ -85,7 +85,7 @@ def test_auto_leave_insert_mode(quteproc): quteproc.wait_for(message='hints: *') # Select the disabled input box to leave insert mode - quteproc.send_cmd(':follow-hint s') + quteproc.send_cmd(':hint-follow s') quteproc.wait_for(message='Clicked non-editable element!') |