Store some vim state per-editor

This fixes a bug where opening and closing command would reset your
selection incorrectly.
This commit is contained in:
Conrad Irwin
2023-08-17 14:09:47 -06:00
parent d308c91020
commit 3514816ece
12 changed files with 106 additions and 48 deletions
+2 -2
View File
@@ -116,8 +116,8 @@ pub fn normal_motion(
pub fn normal_object(object: Object, cx: &mut WindowContext) {
Vim::update(cx, |vim, cx| {
match vim.state.operator_stack.pop() {
Some(Operator::Object { around }) => match vim.state.operator_stack.pop() {
match vim.maybe_pop_operator() {
Some(Operator::Object { around }) => match vim.maybe_pop_operator() {
Some(Operator::Change) => change_object(vim, object, around, cx),
Some(Operator::Delete) => delete_object(vim, object, around, cx),
Some(Operator::Yank) => yank_object(vim, object, around, cx),