fixed issues with expansion of case arm patterns

This commit is contained in:
2026-03-04 18:54:06 -05:00
parent b831bdf166
commit 206c6cb64e
3 changed files with 43 additions and 3 deletions

View File

@@ -42,14 +42,17 @@ pub trait NodeVecUtils<Node> {
impl AutoCmdVecUtils for Vec<AutoCmd> {
fn exec(&self) {
let saved_status = crate::state::get_status();
for cmd in self {
let AutoCmd { pattern: _, command } = cmd;
if let Err(e) = exec_input(command.clone(), None, false, Some("autocmd".into())) {
e.print_error();
}
}
crate::state::set_status(saved_status);
}
fn exec_with(&self, other_pattern: &str) {
let saved_status = crate::state::get_status();
for cmd in self {
let AutoCmd { pattern, command } = cmd;
if let Some(pat) = pattern
@@ -62,6 +65,7 @@ impl AutoCmdVecUtils for Vec<AutoCmd> {
e.print_error();
}
}
crate::state::set_status(saved_status);
}
}