vim: Fix >... (#15404)
Co-Authored-By: @Alextopher Release Notes: - vim: Fixed a hang when repeating an aborted operation ([#15399](https://github.com/zed-industries/zed/issues/15399)).
This commit is contained in:
parent
f58ef9b82b
commit
6db33b83d8
3 changed files with 24 additions and 18 deletions
|
@ -189,25 +189,13 @@ fn observe_keystrokes(keystroke_event: &KeystrokeEvent, cx: &mut WindowContext)
|
|||
return;
|
||||
}
|
||||
|
||||
Vim::update(cx, |vim, cx| match vim.active_operator() {
|
||||
Some(
|
||||
Operator::FindForward { .. }
|
||||
| Operator::FindBackward { .. }
|
||||
| Operator::Replace
|
||||
| Operator::Digraph { .. }
|
||||
| Operator::AddSurrounds { .. }
|
||||
| Operator::ChangeSurrounds { .. }
|
||||
| Operator::DeleteSurrounds
|
||||
| Operator::Mark
|
||||
| Operator::Jump { .. }
|
||||
| Operator::Register
|
||||
| Operator::RecordRegister
|
||||
| Operator::ReplayRegister,
|
||||
) => {}
|
||||
Some(_) => {
|
||||
vim.clear_operator(cx);
|
||||
Vim::update(cx, |vim, cx| {
|
||||
if let Some(operator) = vim.active_operator() {
|
||||
if !operator.is_waiting(vim.state().mode) {
|
||||
vim.clear_operator(cx);
|
||||
vim.stop_recording_immediately(Box::new(ClearOperators))
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue