Revert "Remove into SelectionEffects from .change_selections"

This reverts commit 28380d714d.
This commit is contained in:
Conrad Irwin 2025-06-27 14:06:17 -06:00
parent 28380d714d
commit 6e762d9c05
65 changed files with 625 additions and 837 deletions

View file

@ -12,7 +12,7 @@ use editor::{
entry_diagnostic_aware_icon_decoration_and_color,
entry_diagnostic_aware_icon_name_and_color, entry_git_aware_label_color,
},
scroll::ScrollbarAutoHide,
scroll::{Autoscroll, ScrollbarAutoHide},
};
use file_icons::FileIcons;
use git::status::GitSummary;
@ -1589,7 +1589,7 @@ impl ProjectPanel {
});
self.filename_editor.update(cx, |editor, cx| {
editor.set_text(file_name, window, cx);
editor.change_selections(Default::default(), window, cx, |s| {
editor.change_selections(Some(Autoscroll::fit()), window, cx, |s| {
s.select_ranges([selection])
});
window.focus(&editor.focus_handle(cx));