mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 02:17:35 +03:00
vim: Add repeat support for add_surround (#14746)
Fix: #14242 At present, we don't trigger the method `start_recording(cx)` to start recording when typing add_surround, so it can't be repeated well, delete and change actually don't increase, but when entering `d` and `c`, it happens that these two operations are recorded, I think maybe we also need to call `start_recording(cx)` when calling delete_surround and change_surround, otherwise when the user modifies their shortcuts, these two functions may not be supported by repeat Release Notes: - N/A
This commit is contained in:
parent
d044685706
commit
7d30175527
@ -680,6 +680,9 @@ impl Vim {
|
|||||||
| Operator::DeleteSurrounds
|
| Operator::DeleteSurrounds
|
||||||
) {
|
) {
|
||||||
self.update_state(|state| state.operator_stack.clear());
|
self.update_state(|state| state.operator_stack.clear());
|
||||||
|
if let Operator::AddSurrounds { target: None } = operator {
|
||||||
|
self.start_recording(cx);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
self.update_state(|state| state.operator_stack.push(operator));
|
self.update_state(|state| state.operator_stack.push(operator));
|
||||||
self.sync_vim_settings(cx);
|
self.sync_vim_settings(cx);
|
||||||
|
Loading…
Reference in New Issue
Block a user