Settings refactor (#38367)
Co-Authored-By: Ben K <ben@zed.dev> Co-Authored-By: Anthony <anthony@zed.dev> Co-Authored-By: Mikayla <mikayla@zed.dev> Release Notes: - settings: Major internal changes to settings. The primary user-facing effect is that some settings which did not make sense in project settings files are no-longer read from there. (For example the inline blame settings) --------- Co-authored-by: Ben Kunkle <ben@zed.dev> Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
co-authored by
Ben Kunkle
Mikayla Maki
Anthony
parent
0a9023bce0
commit
fcdab160f9
@@ -271,7 +271,7 @@ mod test {
|
||||
state::Mode,
|
||||
test::{NeovimBackedTestContext, VimTestContext},
|
||||
};
|
||||
use editor::{EditorSettings, ScrollBeyondLastLine};
|
||||
use editor::ScrollBeyondLastLine;
|
||||
use gpui::{AppContext as _, point, px, size};
|
||||
use indoc::indoc;
|
||||
use language::Point;
|
||||
@@ -427,9 +427,7 @@ mod test {
|
||||
// First test without vertical scroll margin
|
||||
cx.neovim.set_option(&format!("scrolloff={}", 0)).await;
|
||||
cx.update_global(|store: &mut SettingsStore, cx| {
|
||||
store.update_user_settings::<EditorSettings>(cx, |s| {
|
||||
s.vertical_scroll_margin = Some(0.0)
|
||||
});
|
||||
store.update_user_settings(cx, |s| s.editor.vertical_scroll_margin = Some(0.0));
|
||||
});
|
||||
|
||||
let content = "ˇ".to_owned() + &sample_text(26, 2, 'a');
|
||||
@@ -455,9 +453,7 @@ mod test {
|
||||
|
||||
cx.neovim.set_option(&format!("scrolloff={}", 3)).await;
|
||||
cx.update_global(|store: &mut SettingsStore, cx| {
|
||||
store.update_user_settings::<EditorSettings>(cx, |s| {
|
||||
s.vertical_scroll_margin = Some(3.0)
|
||||
});
|
||||
store.update_user_settings(cx, |s| s.editor.vertical_scroll_margin = Some(3.0));
|
||||
});
|
||||
|
||||
// scroll down: ctrl-f
|
||||
@@ -485,9 +481,8 @@ mod test {
|
||||
cx.set_shared_state(&content).await;
|
||||
|
||||
cx.update_global(|store: &mut SettingsStore, cx| {
|
||||
store.update_user_settings::<EditorSettings>(cx, |s| {
|
||||
s.scroll_beyond_last_line = Some(ScrollBeyondLastLine::Off);
|
||||
// s.vertical_scroll_margin = Some(0.);
|
||||
store.update_user_settings(cx, |s| {
|
||||
s.editor.scroll_beyond_last_line = Some(ScrollBeyondLastLine::Off);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user