vim: Don't enter visual mode in search/go to definition

Fixes: zed-industries/community#1514
Contributes: zed-industries/community#1284
This commit is contained in:
Conrad Irwin
2023-07-07 15:56:37 -06:00
parent 75fe77c11d
commit 2ffce24ef0
3 changed files with 21 additions and 3 deletions
+2 -3
View File
@@ -936,9 +936,8 @@ impl SearchableItem for Editor {
cx: &mut ViewContext<Self>,
) {
self.unfold_ranges([matches[index].clone()], false, true, cx);
self.change_selections(Some(Autoscroll::fit()), cx, |s| {
s.select_ranges([matches[index].clone()])
});
let range = self.range_for_match(&matches[index]);
self.change_selections(Some(Autoscroll::fit()), cx, |s| s.select_ranges([range]));
}
fn match_index_for_direction(