Switch back to

This commit is contained in:
Mikayla Maki 2023-05-22 12:16:47 -07:00
parent 687ccd4c6f
commit cfdf9198da
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -66,7 +66,7 @@
// "always"
// 4. Never show the scrollbar:
// "never"
"when_to_show": "auto",
"show": "auto",
// Whether to show git diff indicators in the scrollbar.
"git_diff": true
},

View file

@ -12,7 +12,7 @@ pub struct EditorSettings {
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
pub struct Scrollbar {
pub when_to_show: ShowScrollbar,
pub show: ShowScrollbar,
pub git_diff: bool,
}
@ -35,7 +35,7 @@ pub struct EditorSettingsContent {
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
pub struct ScrollbarContent {
pub when_to_show: Option<ShowScrollbar>,
pub show: Option<ShowScrollbar>,
pub git_diff: Option<bool>,
}

View file

@ -2068,7 +2068,7 @@ impl Element<Editor> for EditorElement {
}
let scrollbar_settings = &settings::get::<EditorSettings>(cx).scrollbar;
let show_scrollbars = match scrollbar_settings.when_to_show {
let show_scrollbars = match scrollbar_settings.show {
ShowScrollbar::Auto => {
// Git
(is_singleton && scrollbar_settings.git_diff && snapshot.buffer_snapshot.has_git_diffs())