diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 4e3ace4949..7b6f2e9956 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -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) }); }