diff options
author | Canop <cano.petrole@gmail.com> | 2020-11-27 19:41:30 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-11-27 19:41:30 +0100 |
commit | f1a05da9e1f7abcf00c90c54a75eca354351c7e8 (patch) | |
tree | 79575f195bae5be1ff0b59c82efce44160c5387f /src/browser/browser_state.rs | |
parent | ba9dbf6c0a3827fe6299f3de582db6fc1ce9362a (diff) |
:previous_same_depth and :next_same_depth internals
This can be tested with
```
[[verbs]]
invocation = "psd"
key = "ctrl-up"
internal = ":previous_same_depth"
[[verbs]]
invocation = "nsd"
key = "ctrl-down"
internal = ":next_same_depth"
```
I'm not sure it's really useful but it's costless and allows
experimentations.
Fix #308
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 8e9d3f8..f1a9b60 100644 --- a/src/browser/browser_state.rs +++ b/src/browser/browser_state.rs @@ -302,6 +302,14 @@ impl AppState for BrowserState { self.displayed_tree_mut().try_select_next_match(); AppStateCmdResult::Keep } + Internal::previous_same_depth => { + self.displayed_tree_mut().try_select_previous_same_depth(); + AppStateCmdResult::Keep + } + Internal::next_same_depth => { + self.displayed_tree_mut().try_select_next_same_depth(); + AppStateCmdResult::Keep + } Internal::page_down => { let tree = self.displayed_tree_mut(); if page_height < tree.lines.len() as i32 { |