Set theme before opening documents
This is not consequential now but when we switch to the new highlighter we will want the theme to be set (and the loader's `scopes` to be set based on the theme) before parsing a document. Previously `set_theme` came after the loading of documents, so documents would be missing locals highlights after being loaded and before the first edit.
This commit is contained in:
parent
35575b0b0f
commit
fcddd50325
1 changed files with 1 additions and 2 deletions
|
@ -139,6 +139,7 @@ impl Application {
|
|||
})),
|
||||
handlers,
|
||||
);
|
||||
editor.set_theme(theme);
|
||||
|
||||
let keys = Box::new(Map::new(Arc::clone(&config), |config: &Config| {
|
||||
&config.keys
|
||||
|
@ -237,8 +238,6 @@ impl Application {
|
|||
.unwrap_or_else(|_| editor.new_file(Action::VerticalSplit));
|
||||
}
|
||||
|
||||
editor.set_theme(theme);
|
||||
|
||||
#[cfg(windows)]
|
||||
let signals = futures_util::stream::empty();
|
||||
#[cfg(not(windows))]
|
||||
|
|
Loading…
Add table
Reference in a new issue