Explicitly re-process final character

pull/6960/head
Sam 2 years ago
parent d1a4bd876b
commit df52fea84b

@ -853,7 +853,8 @@ impl EditorView {
commands::insert::insert_char(cx, ch) commands::insert::insert_char(cx, ch)
} }
} }
KeymapResult::Cancelled(pending) => { KeymapResult::Cancelled(mut pending) => {
let last_evt = pending.pop().unwrap();
for ev in pending { for ev in pending {
match ev.char() { match ev.char() {
Some(ch) => commands::insert::insert_char(cx, ch), Some(ch) => commands::insert::insert_char(cx, ch),
@ -866,6 +867,14 @@ impl EditorView {
} }
} }
} }
match self.handle_keymap_event(Mode::Insert, cx, last_evt) {
Some(KeymapResult::NotFound) => {
if let Some(ch) = last_evt.char() {
commands::insert::insert_char(cx, ch)
}
}
_ => (),
}
} }
_ => unreachable!(), _ => unreachable!(),
} }

Loading…
Cancel
Save