diff options
author | Ethan Kiang | 2023-01-03 13:24:48 +0000 |
---|---|---|
committer | GitHub | 2023-01-03 13:24:48 +0000 |
commit | 0dbee9590baed10bef3c6c32420b8a5802204657 (patch) | |
tree | c47bcfc335deafce1968b536469f54522717ffe0 /helix-term/src/application.rs | |
parent | a895a4e53a81da2264fee9dd3b5eec313794ea0b (diff) |
Fix language config reload logic (#5381)
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r-- | helix-term/src/application.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 83e853b1..729047e3 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -403,6 +403,7 @@ impl Application { .map_err(|err| anyhow::anyhow!("Failed to load language config: {}", err))?; self.syn_loader = std::sync::Arc::new(syntax::Loader::new(syntax_config)); + self.editor.syn_loader = self.syn_loader.clone(); for document in self.editor.documents.values_mut() { document.detect_language(self.syn_loader.clone()); } @@ -438,8 +439,13 @@ impl Application { Ok(()) }; - if let Err(err) = refresh_config() { - self.editor.set_error(err.to_string()); + match refresh_config() { + Ok(_) => { + self.editor.set_status("Config refreshed"); + } + Err(err) => { + self.editor.set_error(err.to_string()); + } } } |