Added an on-exit hook for autocmd

improved mode-switching autocmd hook logic

fixed escaping logic in single quote expansion
This commit is contained in:
2026-03-04 14:29:44 -05:00
parent 83f1988299
commit 532e225199
5 changed files with 30 additions and 7 deletions

View File

@@ -1070,6 +1070,14 @@ pub fn unescape_str(raw: &str) -> String {
result.push(markers::SNG_QUOTE);
while let Some(q_ch) = chars.next() {
match q_ch {
'\\' => {
if chars.peek() == Some(&'\'') {
result.push('\'');
chars.next();
} else {
result.push('\\');
}
}
'\'' => {
result.push(markers::SNG_QUOTE);
break;