Switch back to

Mikayla Maki created

Change summary

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(-)

Detailed changes

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
   },

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<ShowScrollbar>,
+    pub show: Option<ShowScrollbar>,
     pub git_diff: Option<bool>,
 }
 

crates/editor/src/element.rs 🔗

@@ -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())