diff options
author | Canop <cano.petrole@gmail.com> | 2020-06-05 09:37:54 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-06-05 09:37:54 +0200 |
commit | f1972b311a2c2a964d5712ab331d6d93854a7320 (patch) | |
tree | df9367109ed74e71656abb857eabc50a825c35d2 /src/browser/browser_state.rs | |
parent | 9cec8aba478849b347495882a4828c989543239d (diff) |
Tab goes to next direct match when there's no verb in input
Also introduce the :previous_match and :next_match internals.
Fix #234
Diffstat (limited to 'src/browser/browser_state.rs')
-rw-r--r-- | src/browser/browser_state.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/browser/browser_state.rs b/src/browser/browser_state.rs index c06ab01..5bbb7c8 100644 --- a/src/browser/browser_state.rs +++ b/src/browser/browser_state.rs @@ -427,6 +427,14 @@ impl AppState for BrowserState { self.displayed_tree_mut().move_selection(-1, page_height); AppStateCmdResult::Keep } + Internal::previous_match => { + self.displayed_tree_mut().try_select_previous_match(); + AppStateCmdResult::Keep + } + Internal::next_match => { + self.displayed_tree_mut().try_select_next_match(); + AppStateCmdResult::Keep + } Internal::page_down => { let tree = self.displayed_tree_mut(); if page_height < tree.lines.len() as i32 { |