mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
vim-patch:7.4.765
Problem: CTRL-A and CTRL-X in Visual mode do not always work well.
Solution: Improvements for increment and decrement. (Christian Brabandt)
9bb1930af9
This commit is contained in:
@@ -3506,7 +3506,21 @@ static void nv_addsub(cmdarg_T *cap)
|
||||
bool visual = VIsual_active;
|
||||
if (cap->oap->op_type == OP_NOP
|
||||
&& do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK) {
|
||||
prep_redo_cmd(cap);
|
||||
if (visual) {
|
||||
ResetRedobuff();
|
||||
AppendCharToRedobuff(VIsual_mode);
|
||||
if (VIsual_mode == 'V') {
|
||||
AppendNumberToRedobuff(cap->oap->line_count);
|
||||
AppendCharToRedobuff('j');
|
||||
}
|
||||
AppendNumberToRedobuff(cap->count1);
|
||||
if (cap->nchar != NUL) {
|
||||
AppendCharToRedobuff(cap->nchar);
|
||||
}
|
||||
AppendCharToRedobuff(cap->cmdchar);
|
||||
} else {
|
||||
prep_redo_cmd(cap);
|
||||
}
|
||||
} else {
|
||||
clearopbeep(cap->oap);
|
||||
}
|
||||
|
Reference in New Issue
Block a user