From 3ee0e81d672a80c57a181038c74fa760392671b6 Mon Sep 17 00:00:00 2001 From: Matt Paras Date: Sat, 21 Jun 2025 14:34:50 -0700 Subject: [PATCH] special case strings when setting the status to eliminate the quotes --- helix-term/src/commands/engine/steel.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/helix-term/src/commands/engine/steel.rs b/helix-term/src/commands/engine/steel.rs index 47b4446ae..6d99decbc 100644 --- a/helix-term/src/commands/engine/steel.rs +++ b/helix-term/src/commands/engine/steel.rs @@ -1992,8 +1992,14 @@ impl super::PluginSystem for SteelScriptingEngine { }) }) { Ok(res) => { - if !matches!(&res, SteelVal::Void) { - cx.editor.set_status(res.to_string()); + match &res { + SteelVal::Void => {} + SteelVal::StringV(s) => { + cx.editor.set_status(s.as_str().to_owned()); + } + _ => { + cx.editor.set_status(res.to_string()); + } } Ok(res) @@ -4688,7 +4694,10 @@ fn pop_last_component_by_name(cx: &mut Context, name: SteelString) { } fn set_status(cx: &mut Context, value: SteelVal) { - cx.editor.set_status(value.to_string()) + match value { + SteelVal::StringV(s) => cx.editor.set_status(s.as_ref().to_owned()), + _ => cx.editor.set_status(value.to_string()), + } } fn enqueue_command(cx: &mut Context, callback_fn: SteelVal) {