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.

vim: Reset search options whenever `/` is used (#19058)

Thorsten Ball36b9e400852b
diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rs
index 6769238407e..364e29242b3 100644
--- a/crates/vim/src/normal/search.rs
+++ b/crates/vim/src/normal/search.rs
@@ -129,14 +129,13 @@ impl Vim {
search_bar.select_query(cx);
cx.focus_self();
- if query.is_empty() {
- search_bar.set_replacement(None, cx);
- search_bar.set_search_options(SearchOptions::REGEX, cx);
- }
+ search_bar.set_replacement(None, cx);
+ search_bar.set_search_options(SearchOptions::NONE | SearchOptions::REGEX, cx);
+
self.search = SearchState {
direction,
count,
- initial_query: query.clone(),
+ initial_query: query,
prior_selections,
prior_operator: self.operator_stack.last().cloned(),
prior_mode: self.mode,