diff options
author | Philipp Albrecht <palbrecht@mailbox.org> | 2023-07-02 13:04:14 +0200 |
---|---|---|
committer | Philipp Albrecht <palbrecht@mailbox.org> | 2023-07-05 11:16:55 +0200 |
commit | 45f6cf01c30261aa4ce983dd7dd4747018943938 (patch) | |
tree | 692300f9da3c173af336e113728f65cfae9f56e8 | |
parent | 73b51d274fc151a7bd2c86c5e5eda90cf065bc9b (diff) | |
download | qutebrowser-45f6cf01c30261aa4ce983dd7dd4747018943938.tar.gz qutebrowser-45f6cf01c30261aa4ce983dd7dd4747018943938.zip |
Don't show warning when jumping to next/prev 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 |