mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
vim-patch:8.2.3369: auto formatting after "cw" leaves cursor in wrong spot
Problem: Auto formatting after "cw" leaves cursor in wrong spot.
Solution: Do not auto-format after the delete. (closes vim/vim#8789)
6b36d2a16d
This commit is contained in:
@@ -1725,7 +1725,9 @@ int op_delete(oparg_T *oap)
|
||||
(int)oap->line_count-1, n, deleted_bytes,
|
||||
0, 0, 0, kExtmarkUndo);
|
||||
}
|
||||
auto_format(false, true);
|
||||
if (oap->op_type == OP_DELETE) {
|
||||
auto_format(false, true);
|
||||
}
|
||||
}
|
||||
|
||||
msgmore(curbuf->b_ml.ml_line_count - old_lcount);
|
||||
@@ -2486,6 +2488,7 @@ int op_change(oparg_T *oap)
|
||||
xfree(ins_text);
|
||||
}
|
||||
}
|
||||
auto_format(false, true);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user