Open folds containing selections when jumping from multibuffer (#21433)
When searching within a single buffer, activating a search result causes any fold containing the result to be unfolded. However, this didn't happen when jumping to a search result from a project-wide search multibuffer. This PR fixes that. Release Notes: - Fixed folds not opening when jumping from search results multibuffer
This commit is contained in:
parent
aca23da971
commit
dc32ab25a0
2 changed files with 70 additions and 1 deletions
|
@ -12876,6 +12876,7 @@ impl Editor {
|
|||
None => Autoscroll::newest(),
|
||||
};
|
||||
let nav_history = editor.nav_history.take();
|
||||
editor.unfold_ranges(&ranges, false, true, cx);
|
||||
editor.change_selections(Some(autoscroll), cx, |s| {
|
||||
s.select_ranges(ranges);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue