settings ui: Add missing setting elements (#39644)
Added the following settings to the UI Editor Page - Scrollbar Section (9 settings) - Show - Cursors - Git Diff - Search Results - Selected Text - Selected Symbol - Diagnostics - Horizontal Scrollbar - Vertical Scrollbar Editor Page - Minimap Section (6 settings) - Show - Display In - Thumb - Thumb Border - Current Line Highlight - Max Width Columns Editor Page - Editor Behavior Section (3 settings) - Expand Excerpt Lines - Excerpt Context Lines - Minimum Contrast For Highlights Debugger Page (7 settings) - Stepping Granularity - Save Breakpoints - Timeout - Dock - Log DAP Communications - Format DAP Log Messages - Button Panels Page - Git Panel Section (3 settings) - Button - Dock - Default Width Collaboration Page - Experimental Section (4 settings) - Auto Microphone Volume - Auto Speaker Volume - Denoise - Legacy Audio Compatible Release Notes: - N/A
This commit is contained in:
@@ -3252,9 +3252,9 @@ impl Project {
|
||||
self.buffers_needing_diff.insert(buffer.downgrade());
|
||||
let first_insertion = self.buffers_needing_diff.len() == 1;
|
||||
let settings = ProjectSettings::get_global(cx);
|
||||
let delay = if let Some(delay) = settings.git.gutter_debounce {
|
||||
delay
|
||||
} else {
|
||||
let delay = settings.git.gutter_debounce;
|
||||
|
||||
if delay == 0 {
|
||||
if first_insertion {
|
||||
let this = cx.weak_entity();
|
||||
cx.defer(move |cx| {
|
||||
@@ -3266,7 +3266,7 @@ impl Project {
|
||||
});
|
||||
}
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
const MIN_DELAY: u64 = 50;
|
||||
let delay = delay.max(MIN_DELAY);
|
||||
|
||||
@@ -300,8 +300,8 @@ pub struct GitSettings {
|
||||
pub git_gutter: settings::GitGutterSetting,
|
||||
/// Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
|
||||
///
|
||||
/// Default: null
|
||||
pub gutter_debounce: Option<u64>,
|
||||
/// Default: 0
|
||||
pub gutter_debounce: u64,
|
||||
/// Whether or not to show git blame data inline in
|
||||
/// the currently focused line.
|
||||
///
|
||||
@@ -446,7 +446,7 @@ impl Settings for ProjectSettings {
|
||||
let git = content.git.as_ref().unwrap();
|
||||
let git_settings = GitSettings {
|
||||
git_gutter: git.git_gutter.unwrap(),
|
||||
gutter_debounce: git.gutter_debounce,
|
||||
gutter_debounce: git.gutter_debounce.unwrap_or_default(),
|
||||
inline_blame: {
|
||||
let inline = git.inline_blame.unwrap();
|
||||
InlineBlameSettings {
|
||||
|
||||
Reference in New Issue
Block a user