Mercurial > vim
comparison src/normal.c @ 6891:f9876721bedc v7.4.765
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 03 Jul 2015 12:44:07 +0200 |
parents | 9798a98a1583 |
children | 58d9f967ae1a |
comparison
equal
deleted
inserted
replaced
6890:99fc18dc1ede | 6891:f9876721bedc |
---|---|
4202 cmdarg_T *cap; | 4202 cmdarg_T *cap; |
4203 { | 4203 { |
4204 int visual = VIsual_active; | 4204 int visual = VIsual_active; |
4205 if (cap->oap->op_type == OP_NOP | 4205 if (cap->oap->op_type == OP_NOP |
4206 && do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK) | 4206 && do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK) |
4207 prep_redo_cmd(cap); | 4207 { |
4208 if (visual) | |
4209 { | |
4210 ResetRedobuff(); | |
4211 AppendCharToRedobuff(VIsual_mode); | |
4212 if (VIsual_mode == 'V') | |
4213 { | |
4214 AppendNumberToRedobuff(cap->oap->line_count); | |
4215 AppendCharToRedobuff('j'); | |
4216 } | |
4217 AppendNumberToRedobuff(cap->count1); | |
4218 if (cap->nchar != NUL) | |
4219 AppendCharToRedobuff(cap->nchar); | |
4220 AppendCharToRedobuff(cap->cmdchar); | |
4221 } | |
4222 else | |
4223 prep_redo_cmd(cap); | |
4224 } | |
4208 else | 4225 else |
4209 clearopbeep(cap->oap); | 4226 clearopbeep(cap->oap); |
4210 if (visual) | 4227 if (visual) |
4211 { | 4228 { |
4212 VIsual_active = FALSE; | 4229 VIsual_active = FALSE; |