Apply autoscroll_on_clicks when extending selection (#28235)

Closes https://github.com/zed-industries/zed/issues/22240

Release Notes:

- Fixed `autoscroll_on_clicks` not being applied when expanding
selection

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
neunato
2025-05-06 07:05:08 +00:00
committed by GitHub
co-authored by Kirill Bulatov
parent a0bfe4d293
commit 86cc5c2b55
+3 -1
View File
@@ -2952,7 +2952,9 @@ impl Editor {
_ => {}
}
self.change_selections(Some(Autoscroll::fit()), window, cx, |s| {
let auto_scroll = EditorSettings::get_global(cx).autoscroll_on_clicks;
self.change_selections(auto_scroll.then(Autoscroll::fit), window, cx, |s| {
s.set_pending(pending_selection, pending_mode)
});
}