Switch back to
This commit is contained in:
parent
687ccd4c6f
commit
cfdf9198da
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue