Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
vim: Add :noh[lsearch] (#20056)
Conrad Irwinf757e5a6c308
diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rsindex 5846a6efc51..0428787570b 100644--- a/crates/search/src/buffer_search.rs+++ b/crates/search/src/buffer_search.rs@@ -546,6 +546,9 @@ impl BufferSearchBar {registrar.register_handler(ForDeployed(|this, _: &editor::actions::Cancel, cx| {this.dismiss(&Dismiss, cx);}));+ registrar.register_handler(ForDeployed(|this, _: &Dismiss, cx| {+ this.dismiss(&Dismiss, cx);+ }));// register deploy buffer search for both search bar states, since we want to focus into the search bar// when the deploy action is triggered in the buffer.diff --git a/crates/vim/src/command.rs b/crates/vim/src/command.rsindex 47975f4cfd0..8aa84acc141 100644--- a/crates/vim/src/command.rs+++ b/crates/vim/src/command.rs@@ -682,6 +682,7 @@ fn generate_commands(_: &AppContext) -> Vec<VimCommand> {VimCommand::str(("Ch", "at"), "chat_panel::ToggleFocus"),VimCommand::str(("No", "tifications"), "notification_panel::ToggleFocus"),VimCommand::str(("A", "I"), "assistant::ToggleFocus"),+ VimCommand::new(("noh", "lsearch"), search::buffer_search::Dismiss),VimCommand::new(("$", ""), EndOfDocument),VimCommand::new(("%", ""), EndOfDocument),VimCommand::new(("0", ""), StartOfDocument),