diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app/tab.rs | 4 | ||||
-rw-r--r-- | src/event/event_exec.rs | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/app/tab.rs b/src/app/tab.rs index ffa887a..cbc90dd 100644 --- a/src/app/tab.rs +++ b/src/app/tab.rs @@ -51,6 +51,10 @@ impl TabSettings { self.filter = filter } + pub fn reset_filter(&mut self) { + self.filter = FilterKind::All; + } + /// Update the kind of sort from a char typed by the user. fn update_sort_from_char(&mut self, c: char) { self.sort_kind.update_from_char(c) diff --git a/src/event/event_exec.rs b/src/event/event_exec.rs index ee8bad6..b053c7e 100644 --- a/src/event/event_exec.rs +++ b/src/event/event_exec.rs @@ -70,6 +70,12 @@ impl EventAction { /// Reset the inputs and completion, reset the window, exit the preview. pub fn reset_mode(status: &mut Status) -> Result<()> { if !matches!(status.current_tab().edit_mode, Edit::Nothing) { + if matches!( + status.current_tab().edit_mode, + Edit::InputSimple(InputSimple::Filter) + ) { + status.current_tab_mut().settings.reset_filter() + } if status.reset_edit_mode()? { status.tabs[status.index].refresh_view()?; } else { |