Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

helix: Fix `buffer search: deploy` reset to normal mode (#36917)

Adam Mulvany0e575b280997
diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rs
index 4fbeec72365..dba003ec5fc 100644
--- a/crates/vim/src/normal/search.rs
+++ b/crates/vim/src/normal/search.rs
@@ -203,7 +203,10 @@ impl Vim {
// hook into the existing to clear out any vim search state on cmd+f or edit -> find.
fn search_deploy(&mut self, _: &buffer_search::Deploy, _: &mut Window, cx: &mut Context<Self>) {
+ // Preserve the current mode when resetting search state
+ let current_mode = self.mode;
self.search = Default::default();
+ self.search.prior_mode = current_mode;
cx.propagate();
}