Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/commands/typed.rs')
-rw-r--r--helix-term/src/commands/typed.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 8b542eb1..6685691f 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1025,18 +1025,18 @@ fn theme(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow
let true_color = cx.editor.config.load().true_color || crate::true_color();
match event {
PromptEvent::Abort => {
- cx.editor.unset_theme_preview();
+ cx.editor.unset_theme_preview()?;
}
PromptEvent::Update => {
if args.is_empty() {
// Ensures that a preview theme gets cleaned up if the user backspaces until the prompt is empty.
- cx.editor.unset_theme_preview();
+ cx.editor.unset_theme_preview()?;
} else if let Some(theme_name) = args.first() {
if let Ok(theme) = cx.editor.theme_loader.load(theme_name) {
if !(true_color || theme.is_16_color()) {
bail!("Unsupported theme: theme requires true color support");
}
- cx.editor.set_theme_preview(theme);
+ cx.editor.set_theme_preview(theme)?;
};
};
}
@@ -1050,8 +1050,7 @@ fn theme(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow
if !(true_color || theme.is_16_color()) {
bail!("Unsupported theme: theme requires true color support");
}
- cx.editor.set_theme(theme);
- cx.editor.config_events.0.send(ConfigEvent::ThemeChanged)?;
+ cx.editor.set_theme(theme)?;
} else {
let name = cx.editor.theme.name().to_string();