]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.387 v7.4.387
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Jul 2014 14:00:58 +0000 (16:00 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Jul 2014 14:00:58 +0000 (16:00 +0200)
Problem:    "4gro" replaces one character then executes "ooo". (Urtica Dioica)
Solution:   Write the ESC in the second stuff buffer.

12 files changed:
src/edit.c
src/getchar.c
src/proto/getchar.pro
src/testdir/Make_amiga.mak
src/testdir/Make_dos.mak
src/testdir/Make_ming.mak
src/testdir/Make_os2.mak
src/testdir/Make_vms.mms
src/testdir/Makefile
src/testdir/test_insertcount.in [new file with mode: 0644]
src/testdir/test_insertcount.ok [new file with mode: 0644]
src/version.c

index 6bc517e2fb253ea3544fff4c82e99426c06d8d65..6f30d81f603f992308a57fbd7d1421115d570c3f 100644 (file)
@@ -8389,7 +8389,7 @@ ins_esc(count, cmdchar, nomove)
 
            (void)start_redo_ins();
            if (cmdchar == 'r' || cmdchar == 'v')
-               stuffReadbuff(ESC_STR); /* no ESC in redo buffer */
+               stuffRedoReadbuff(ESC_STR);     /* no ESC in redo buffer */
            ++RedrawingDisabled;
            disabled_redraw = TRUE;
            return FALSE;       /* repeat the insert */
index 9c1ab0f4bdb83f805f04551855a6e7d46b04c558..d646dc4c156685e1b8df799e56a32569524cc5a9 100644 (file)
@@ -678,6 +678,17 @@ stuffReadbuff(s)
     add_buff(&readbuf1, s, -1L);
 }
 
+/*
+ * Append string "s" to the redo stuff buffer.
+ * CSI and K_SPECIAL must already have been escaped.
+ */
+    void
+stuffRedoReadbuff(s)
+    char_u     *s;
+{
+    add_buff(&readbuf2, s, -1L);
+}
+
     void
 stuffReadbuffLen(s, len)
     char_u     *s;
index 897cad37fc994f27f0c73e106f2389741a4b8f8a..e90b50527b7edae8ba8280b0713f1d6aa74206a3 100644 (file)
@@ -15,6 +15,7 @@ void AppendToRedobuffLit __ARGS((char_u *str, int len));
 void AppendCharToRedobuff __ARGS((int c));
 void AppendNumberToRedobuff __ARGS((long n));
 void stuffReadbuff __ARGS((char_u *s));
+void stuffRedoReadbuff __ARGS((char_u *s));
 void stuffReadbuffLen __ARGS((char_u *s, long len));
 void stuffReadbuffSpec __ARGS((char_u *s));
 void stuffcharReadbuff __ARGS((int c));
index b4d829da039ea079957dbea839c740064a7e1c32..030542430c690dad2485d52b61f3fe86be8c5d0e 100644 (file)
@@ -43,6 +43,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_qf_title.out \
                test_changelist.out \
                test_eval.out \
+               test_insertcount.out \
                test_options.out
 
 .SUFFIXES: .in .out
@@ -174,4 +175,5 @@ test_listlbr_utf8.out: test_listlbr_utf8.in
 test_qf_title.out: test_qf_title.in
 test_changelist.out: test_changelist.in
 test_eval.out: test_eval.in
+test_insertcount.out: test_insertcount.in
 test_options.out: test_options.in
index bd727b8ebd7cc6464ee4ce0d33988d6d62f9c9c7..232e8809d3ba818a1bb6382d8fdc5b128a5c23c0 100644 (file)
@@ -42,6 +42,7 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_qf_title.out \
                test_changelist.out \
                test_eval.out \
+               test_insertcount.out \
                test_options.out
 
 SCRIPTS32 =    test50.out test70.out
index 0664a95983d40df520eeb8a745dce84d8f7e566a..eb533c9d0b339e7562838a263edce497fe878223 100644 (file)
@@ -62,6 +62,7 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_qf_title.out \
                test_changelist.out \
                test_eval.out \
+               test_insertcount.out \
                test_options.out
 
 SCRIPTS32 =    test50.out test70.out
index c66489c14af01b806225d1c4818d36bcaf84d7be..0bd0096061ec1b359dfa4b2decc1267d85651119 100644 (file)
@@ -40,6 +40,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_autoformat_join.out \
                test_changelist.out \
                test_eval.out \
+               test_insertcount.out \
                test_breakindent.out \
                test_listlbr.out \
                test_listlbr_utf8.out \
index 1a45e35b792e89d3e937768ca73fd86d5bcef2ac..7ccdf24e7205f29343aee1dae239757aa99d4240 100644 (file)
@@ -103,6 +103,7 @@ SCRIPT = test1.out  test2.out  test3.out  test4.out  test5.out  \
         test_qf_title.out \
         test_changelist.out \
         test_eval.out \
+        test_insertcount.out \
         test_options.out
 
 # Known problems:
index 4e4671d9bdd1d6a05db0a1e9151bbe19a3b70680..f2b22163782647611594284215a2eedcef231afa 100644 (file)
@@ -40,6 +40,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
                test_qf_title.out \
                test_changelist.out \
                test_eval.out \
+               test_insertcount.out \
                test_options.out
 
 SCRIPTS_GUI = test16.out
diff --git a/src/testdir/test_insertcount.in b/src/testdir/test_insertcount.in
new file mode 100644 (file)
index 0000000..c7595b1
--- /dev/null
@@ -0,0 +1,14 @@
+Tests for repeating insert and replace.
+
+STARTTEST
+:so small.vim
+:/Second
+4gro
+:/^First/,$wq! test.out
+:" get here when failed and in Insert mode
+\e:.wq! test.out
+ENDTEST
+
+First line
+Second line
+Last line
diff --git a/src/testdir/test_insertcount.ok b/src/testdir/test_insertcount.ok
new file mode 100644 (file)
index 0000000..57afab0
--- /dev/null
@@ -0,0 +1,3 @@
+First line
+ooooecond line
+Last line
index 3967da2c113fb776e55cb036a58553a2fff9b490..33bcfbabd5b73e7d2efe293cbcd1b6aff730f02c 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    387,
 /**/
     386,
 /**/