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-06-28 11:47:14 -06:00
parent 75fe77c11d
commit 2ffce24ef0
3 changed files with 21 additions and 3 deletions

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(