Unfold range when selecting the next match

Selected matches are unfolded when in project search, buffer search and
when hitting `cmd-d` to select the next match.
This commit is contained in:
Antonio Scandurra 2022-03-24 17:16:21 +01:00
parent 78b52168fa
commit 7fa7b7e507
3 changed files with 6 additions and 5 deletions

View file

@ -3907,6 +3907,7 @@ impl Editor {
reversed: false,
goal: SelectionGoal::None,
});
self.unfold_ranges([next_selected_range], false, cx);
self.update_selections(selections, Some(Autoscroll::Newest), cx);
} else {
select_next_state.done = true;
@ -3934,6 +3935,7 @@ impl Editor {
wordwise: true,
done: false,
};
self.unfold_ranges([selection.start..selection.end], false, cx);
self.update_selections(selections, Some(Autoscroll::Newest), cx);
self.select_next_state = Some(select_state);
} else {