Mercurial > vim
changeset 7011:6cde6404ff7c v7.4.823
patch 7.4.823
Problem: Cursor moves after CTRL-A on alphabetic character.
Solution: (Hirohito Higashi, test by Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Aug 2015 19:36:42 +0200 |
parents | f28fa3fc6821 |
children | 0175e7cfea2e |
files | src/ops.c src/testdir/test_increment.in src/testdir/test_increment.ok src/version.c |
diffstat | 4 files changed, 35 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ops.c +++ b/src/ops.c @@ -5584,6 +5584,7 @@ do_addsub(command, Prenum1, g_cmd) did_change = TRUE; (void)del_char(FALSE); ins_char(firstdigit); + curwin->w_cursor.col = col; } else {
--- a/src/testdir/test_increment.in +++ b/src/testdir/test_increment.in @@ -268,7 +268,15 @@ Text: Expected: 1) <Ctrl-V>j$ <ctrl-a> 2 - 1b + 2a + +20) increment a single letter +Text: + a + + Expected: + 1) <Ctrl-a> and cursor is on a + b @@ -386,6 +394,13 @@ V3kg.. k$ :set nrformats&vim +:" Test 20 +:set nrformats+=alpha +:/^S20=/+,/^E20=/-y a +:/^E20=/+put a +:.put =col('.') +:set nrformats&vim + :" Save the report :/^# Test 1/,$w! test.out :qa! @@ -572,6 +587,13 @@ E19==== +# Test 20 +S20==== +a +E20==== + + + ENDTEST