diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-07-10 16:38:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-10 16:38:36 +0200 |
commit | 9646f53fb567c96491d5c4ed292d4c98676fa1cd (patch) | |
tree | c436b7cb925d782b9a08b35529edb1fcac84f086 | |
parent | 72aee69c9f295bf2dffaf38d8b5721b168963692 (diff) | |
parent | 45f6cf01c30261aa4ce983dd7dd4747018943938 (diff) | |
download | qutebrowser-9646f53fb567c96491d5c4ed292d4c98676fa1cd.tar.gz qutebrowser-9646f53fb567c96491d5c4ed292d4c98676fa1cd.zip |
Merge pull request #7764 from pylbrecht:search-vanished
Don't show warning when jumping to next/prev search result without matches
-rw-r--r-- | qutebrowser/browser/commands.py | 3 | ||||
-rw-r--r-- | tests/end2end/features/search.feature | 16 |
2 files changed, 17 insertions, 2 deletions
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 3b38c44c0..410b844a0 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1597,8 +1597,7 @@ class CommandDispatcher: def _search_navigation_cb(self, result): """Callback called from :search-prev/next.""" if result == browsertab.SearchNavigationResult.not_found: - # FIXME check if this actually can happen... - message.warning("Search result vanished...") + self._search_cb(found=False, text=self._tabbed_browser.search_text) return elif result == browsertab.SearchNavigationResult.found: return diff --git a/tests/end2end/features/search.feature b/tests/end2end/features/search.feature index 62b409a19..aad8f2792 100644 --- a/tests/end2end/features/search.feature +++ b/tests/end2end/features/search.feature @@ -147,6 +147,14 @@ Feature: Searching on a page And I run :search-next Then the error "No search done yet." should be shown + # https://github.com/qutebrowser/qutebrowser/issues/7275 + @qtwebkit_skip + Scenario: Jumping to next without matches + When I run :search doesnotmatch + And I wait for the warning "Text 'doesnotmatch' not found on page!" + And I run :search-next + Then the warning "Text 'doesnotmatch' not found on page!" should be shown + Scenario: Repeating search in a second tab (issue #940) When I open data/search.html in a new tab And I run :search foo @@ -222,6 +230,14 @@ Feature: Searching on a page And I run :search-prev Then the error "No search done yet." should be shown + # https://github.com/qutebrowser/qutebrowser/issues/7275 + @qtwebkit_skip + Scenario: Jumping to previous without matches + When I run :search doesnotmatch + And I wait for the warning "Text 'doesnotmatch' not found on page!" + And I run :search-prev + Then the warning "Text 'doesnotmatch' not found on page!" should be shown + ## wrapping Scenario: Wrapping around page |