]> granicus.if.org Git - vim/commitdiff
patch 7.4.823 v7.4.823
authorBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 17:36:42 +0000 (19:36 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 17:36:42 +0000 (19:36 +0200)
Problem:    Cursor moves after CTRL-A on alphabetic character.
Solution:   (Hirohito Higashi, test by Christian Brabandt)

src/ops.c
src/testdir/test_increment.in
src/testdir/test_increment.ok
src/version.c

index f53567bc104f7cb6011a61efc6c83d74ae14a65e..62d88a786a6be2abecad61c017f7596188c1f74b 100644 (file)
--- 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
        {
index fb7e6e3ee28b397dcd980f9ac8c10e8999746885..ecbc6f99a13ac3a0b458d729c1e2dae96429a418 100644 (file)
@@ -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\ 1..
 \16k$\ 1
 :set nrformats&vim
 
+:" Test 20
+:set nrformats+=alpha
+:/^S20=/+,/^E20=/-y a
+:/^E20=/+put a
+\ 1:.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
 
index 685478e668bfd915d8f01ec48a6790927ce3c883..48e722f038eadd20197f02e70f91d8b1abb76aa2 100644 (file)
@@ -271,6 +271,15 @@ E19====
 2a
 
 
+# Test 20
+S20====
+a
+E20====
+
+b
+1
+
+
 
 ENDTEST
 
index 62eb4ed46f72b84da87b63b76de3f66257532cfa..c2fd979cadd5ed84f7242c1c3bcab5ee0c2f5c83 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    823,
 /**/
     822,
 /**/