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.

Fix previous theme not being applied on startup

Kirill Bulatov074966427d19
diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs
index 3b158ab9bb7..92a5877f514 100644
--- a/crates/theme/src/theme.rs
+++ b/crates/theme/src/theme.rs
@@ -62,6 +62,10 @@ pub enum LoadThemes {
pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
cx.set_global(ThemeRegistry::default());
+ match themes_to_load {
+ LoadThemes::JustBase => (),
+ LoadThemes::All => cx.global_mut::<ThemeRegistry>().load_user_themes(),
+ }
ThemeSettings::register(cx);
let mut prev_buffer_font_size = ThemeSettings::get_global(cx).buffer_font_size;
@@ -73,11 +77,6 @@ pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
}
})
.detach();
-
- match themes_to_load {
- LoadThemes::JustBase => (),
- LoadThemes::All => cx.global_mut::<ThemeRegistry>().load_user_themes(),
- }
}
pub trait ActiveTheme {