From a6d713eb3d476e56aec450d338167d3e6d25822d Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:44:23 +0200 Subject: [PATCH] editor: Keep scrollbar up if there are selections Z-2556 --- crates/editor/src/element.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index e96f1efe92..bd662c039b 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2149,6 +2149,9 @@ impl Element for EditorElement { ShowScrollbar::Auto => { // Git (is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs()) + || + // Selections + (is_singleton && scrollbar_settings.selections && !highlighted_ranges.is_empty()) // Scrollmanager || editor.scroll_manager.scrollbars_visible() }