Closes #ISSUE Release Notes: - Fixes vim "go to definition" making a selection
This commit is contained in:
@@ -847,6 +847,9 @@ impl Vim {
|
||||
let mut start_selection = 0usize;
|
||||
let mut end_selection = 0usize;
|
||||
|
||||
self.update_editor(cx, |_, editor, _| {
|
||||
editor.set_collapse_matches(false);
|
||||
});
|
||||
if vim_is_normal {
|
||||
pane.update(cx, |pane, cx| {
|
||||
if let Some(search_bar) = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>()
|
||||
@@ -857,7 +860,7 @@ impl Vim {
|
||||
}
|
||||
// without update_match_index there is a bug when the cursor is before the first match
|
||||
search_bar.update_match_index(window, cx);
|
||||
search_bar.select_match(direction.opposite(), 1, false, window, cx);
|
||||
search_bar.select_match(direction.opposite(), 1, window, cx);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -875,7 +878,7 @@ impl Vim {
|
||||
if let Some(search_bar) = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>() {
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
search_bar.update_match_index(window, cx);
|
||||
search_bar.select_match(direction, count, false, window, cx);
|
||||
search_bar.select_match(direction, count, window, cx);
|
||||
match_exists = search_bar.match_exists(window, cx);
|
||||
});
|
||||
}
|
||||
@@ -902,6 +905,7 @@ impl Vim {
|
||||
editor.change_selections(Default::default(), window, cx, |s| {
|
||||
s.select_ranges([start_selection..end_selection]);
|
||||
});
|
||||
editor.set_collapse_matches(true);
|
||||
});
|
||||
|
||||
match self.maybe_pop_operator() {
|
||||
|
||||
Reference in New Issue
Block a user