special case strings when setting the status to eliminate the quotes

pull/8675/merge^2
Matt Paras 2025-06-21 14:34:50 -07:00
parent ef244de365
commit 3ee0e81d67
1 changed files with 12 additions and 3 deletions

View File

@ -1992,9 +1992,15 @@ impl super::PluginSystem for SteelScriptingEngine {
}) })
}) { }) {
Ok(res) => { Ok(res) => {
if !matches!(&res, SteelVal::Void) { match &res {
SteelVal::Void => {}
SteelVal::StringV(s) => {
cx.editor.set_status(s.as_str().to_owned());
}
_ => {
cx.editor.set_status(res.to_string()); cx.editor.set_status(res.to_string());
} }
}
Ok(res) 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) { 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) { fn enqueue_command(cx: &mut Context, callback_fn: SteelVal) {