From cfdf9198dac938140daa662325bd5c043e69cbe0 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 22 May 2023 12:16:47 -0700 Subject: [PATCH] Switch back to --- assets/settings/default.json | 2 +- crates/editor/src/editor_settings.rs | 4 ++-- crates/editor/src/element.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index 84db3f8ea1be70aa1243664a5bb5de3b04abf25a..e4e7a8c522d3585dda3ef9ac05a01d37b72bcda5 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -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 }, diff --git a/crates/editor/src/editor_settings.rs b/crates/editor/src/editor_settings.rs index d97006e5839248960edc3e0b35dc61890613dcaa..7f01834b161b8f1db75a40145694f1c80e473755 100644 --- a/crates/editor/src/editor_settings.rs +++ b/crates/editor/src/editor_settings.rs @@ -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, + pub show: Option, pub git_diff: Option, } diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index b5e09fc86c20e2897c1a45fbac5ee2efb10c0651..13a24bfc2c1f884dc2dc1d8cc916e6fc22855ea4 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2068,7 +2068,7 @@ impl Element for EditorElement { } let scrollbar_settings = &settings::get::(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())