Skip to content

Commit

Permalink
Clear search input and results during mode reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacdonald committed Jul 25, 2024
1 parent f5305f2 commit a96ad41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/input/key_map/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ normal:
"'": application::switch_to_jump_mode
"0": application::switch_to_command_mode
"#": application::switch_to_syntax_mode
/:
- application::switch_to_search_mode
- search::clear_query
/: application::switch_to_search_mode
",": view::scroll_up
">": buffer::indent_line
"<": buffer::outdent_line
Expand Down
2 changes: 2 additions & 0 deletions src/models/application/modes/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ impl SearchMode {

pub fn reset(&mut self) {
self.insert = true;
self.input = None;
self.results = None;
}

pub fn insert_mode(&self) -> bool {
Expand Down

0 comments on commit a96ad41

Please sign in to comment.