diff options
author | Canop <cano.petrole@gmail.com> | 2021-04-22 07:59:38 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-04-22 07:59:38 +0200 |
commit | 207da5f6fbb0738d4579ed54015b505e5ba13557 (patch) | |
tree | 9f99aa2ad228494807d58d6178dc717f15aecc9a /src | |
parent | 7c01fa61994445038801d7da763ca48030088dde (diff) |
staging area: show selection mark if required by conf
Diffstat (limited to 'src')
-rw-r--r-- | src/stage/stage_state.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stage/stage_state.rs b/src/stage/stage_state.rs index b7cac1f..2cb6d1b 100644 --- a/src/stage/stage_state.rs +++ b/src/stage/stage_state.rs @@ -250,6 +250,9 @@ impl PanelState for StageState { } style = &bg_style; } + if disc.con.show_selection_mark && self.filtered_stage.has_selection() { + cw.queue_char(style, if selected { '▶' } else { ' ' })?; + } if pattern_object.subpath { let label = path.to_string_lossy(); // we must display the matching on the whole path @@ -365,8 +368,8 @@ impl PanelState for StageState { self.filtered_stage = FilteredStage::unfiltered(&app_state.stage); CmdResult::Keep } - Internal::back if self.filtered_stage.pattern().is_some() => { - self.filtered_stage = FilteredStage::unfiltered(&app_state.stage); + Internal::back if self.filtered_stage.has_selection() => { + self.filtered_stage.unselect(); CmdResult::Keep } Internal::line_down => { |