diff options
author | Canop <cano.petrole@gmail.com> | 2019-10-28 21:36:13 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2019-10-28 21:36:13 +0100 |
commit | cc75ea49789b5f2e16566b563ebce8da15575ef8 (patch) | |
tree | 83a7c1c7b3e0de01c32f8258e5fd3af2a2978246 /src/browser_states.rs | |
parent | b7eee38da944537084f2f518e9ef2dfb8ba7d8c8 (diff) |
Application running entirely on stderr
At the (temporary) price of having mouse support disabled
Diffstat (limited to 'src/browser_states.rs')
-rw-r--r-- | src/browser_states.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/browser_states.rs b/src/browser_states.rs index fcd7591..bb9d26e 100644 --- a/src/browser_states.rs +++ b/src/browser_states.rs @@ -256,7 +256,7 @@ impl AppState for BrowserState { Ok(AppStateCmdResult::Keep) } Action::DoubleClick(_, y) => { - if self.displayed_tree().selection + 1 == *y as usize { + if self.displayed_tree().selection == *y as usize { self.open_selection_stay_in_broot(screen, con) } else { // A double click always come after a simple click at @@ -371,8 +371,7 @@ impl AppState for BrowserState { w: &mut W, screen: &Screen, _con: &AppContext - ) -> Result<(), ProgramError> - { + ) -> Result<(), ProgramError> { screen.goto(w, 0, 0)?; let dp = DisplayableTree { tree: &self.displayed_tree(), @@ -394,8 +393,7 @@ impl AppState for BrowserState { screen: &mut Screen, cmd: &Command, con: &AppContext, - ) -> Result<(), ProgramError> - { + ) -> Result<(), ProgramError> { match &cmd.action { Action::FuzzyPatternEdit(s) if !s.is_empty() => self.write_status_normal(w, screen, true), Action::RegexEdit(s, _) if !s.is_empty() => self.write_status_normal(w, screen, true), |