Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Switch back to

Mikayla Makicfdf9198dac9
diff --git a/assets/settings/default.json b/assets/settings/default.json
index 84db3f8ea1b..e4e7a8c522d 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 d97006e5839..7f01834b161 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<ShowScrollbar>,
+ pub show: Option<ShowScrollbar>,
pub git_diff: Option<bool>,
}
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index b5e09fc86c2..13a24bfc2c1 100644
--- a/crates/editor/src/element.rs
+++ b/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())