editor: Keep scrollbar up if there are selections

Z-2556
This commit is contained in:
Piotr Osiewicz committed 2023-07-10 17:44:27 +02:00
1 parent 7fadcea4c7
commit 659dda1703
1 file changed
+3
+3
View File
@@ -2149,6 +2149,9 @@ impl Element<Editor> 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()
}