diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-07-30 16:00:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-07-30 16:00:58 +0200 |
commit | 4f5ce33d415a0eeedd7f04baa6715431e72652e1 (patch) | |
tree | 2ba79c0e7cdd6e2ed02b741142cf0a4822e67093 /src | |
parent | 23fb7a995534f45a497761461d487e38cc1067f7 (diff) | |
download | vim-4f5ce33d415a0eeedd7f04baa6715431e72652e1.zip |
updated for version 7.4.387
Problem: "4gro" replaces one character then executes "ooo". (Urtica Dioica)
Solution: Write the ESC in the second stuff buffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/edit.c | 2 | ||||
-rw-r--r-- | src/getchar.c | 11 | ||||
-rw-r--r-- | src/proto/getchar.pro | 1 | ||||
-rw-r--r-- | src/testdir/Make_amiga.mak | 2 | ||||
-rw-r--r-- | src/testdir/Make_dos.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_ming.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_os2.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_vms.mms | 1 | ||||
-rw-r--r-- | src/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/testdir/test_insertcount.in | 14 | ||||
-rw-r--r-- | src/testdir/test_insertcount.ok | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
12 files changed, 39 insertions, 1 deletions
diff --git a/src/edit.c b/src/edit.c index 6bc517e2f..6f30d81f6 100644 --- a/src/edit.c +++ b/src/edit.c @@ -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 */ diff --git a/src/getchar.c b/src/getchar.c index 9c1ab0f4b..d646dc4c1 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -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; diff --git a/src/proto/getchar.pro b/src/proto/getchar.pro index 897cad37f..e90b50527 100644 --- a/src/proto/getchar.pro +++ b/src/proto/getchar.pro @@ -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)); diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak index b4d829da0..030542430 100644 --- a/src/testdir/Make_amiga.mak +++ b/src/testdir/Make_amiga.mak @@ -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 diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index bd727b8eb..232e8809d 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -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 diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak index 0664a9598..eb533c9d0 100644 --- a/src/testdir/Make_ming.mak +++ b/src/testdir/Make_ming.mak @@ -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 diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak index c66489c14..0bd009606 100644 --- a/src/testdir/Make_os2.mak +++ b/src/testdir/Make_os2.mak @@ -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 \ diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index 1a45e35b7..7ccdf24e7 100644 --- a/src/testdir/Make_vms.mms +++ b/src/testdir/Make_vms.mms @@ -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: diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 4e4671d9b..f2b221637 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -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 index 000000000..c7595b1ce --- /dev/null +++ b/src/testdir/test_insertcount.in @@ -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 +:.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 index 000000000..57afab00f --- /dev/null +++ b/src/testdir/test_insertcount.ok @@ -0,0 +1,3 @@ +First line +ooooecond line +Last line diff --git a/src/version.c b/src/version.c index 3967da2c1..33bcfbabd 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 387, +/**/ 386, /**/ 385, |