Add show line endings button to Settings UI (#55707)
This is following up from #39609 to add the line endings button setting into settings ui. Release Notes: - Added the line endings button setting to settings ui.
This commit is contained in:
1 parent
29c8f13296
commit
d1525d92b1
1 file changed
+23
-1
@@ -3487,7 +3487,7 @@ fn search_and_files_page() -> SettingsPage {
|
||||
}
|
||||
|
||||
fn window_and_layout_page() -> SettingsPage {
|
||||
fn status_bar_section() -> [SettingsPageItem; 10] {
|
||||
fn status_bar_section() -> [SettingsPageItem; 11] {
|
||||
[
|
||||
SettingsPageItem::SectionHeader("Status Bar"),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
@@ -3574,6 +3574,28 @@ fn window_and_layout_page() -> SettingsPage {
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Line Endings Button",
|
||||
description: "Show the active line endings button in the status bar.",
|
||||
field: Box::new(SettingField {
|
||||
json_path: Some("status_bar.line_endings_button"),
|
||||
pick: |settings_content| {
|
||||
settings_content
|
||||
.status_bar
|
||||
.as_ref()?
|
||||
.line_endings_button
|
||||
.as_ref()
|
||||
},
|
||||
write: |settings_content, value, _| {
|
||||
settings_content
|
||||
.status_bar
|
||||
.get_or_insert_default()
|
||||
.line_endings_button = value;
|
||||
},
|
||||
}),
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Terminal Button",
|
||||
description: "Show the terminal button in the status bar.",
|
||||
|
||||
Reference in new issue
Block a user