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)
diff --git a/src/normal.c b/src/normal.c
index 8d8be9b..a38538f 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4204,7 +4204,24 @@
int 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);
if (visual)