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:
Cole Miller 2024-12-03 17:14:17 -05:00 committed by GitHub
parent aca23da971
commit dc32ab25a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 70 additions and 1 deletions

View file

@ -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);
});