Skip to content

Commit 83651e5

Browse files
brammooldouglaskayama
authored andcommitted
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.
1 parent 51efc1f commit 83651e5

12 files changed

Lines changed: 39 additions & 1 deletion

src/edit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8389,7 +8389,7 @@ ins_esc(count, cmdchar, nomove)
83898389

83908390
(void)start_redo_ins();
83918391
if (cmdchar == 'r' || cmdchar == 'v')
8392-
stuffReadbuff(ESC_STR); /* no ESC in redo buffer */
8392+
stuffRedoReadbuff(ESC_STR); /* no ESC in redo buffer */
83938393
++RedrawingDisabled;
83948394
disabled_redraw = TRUE;
83958395
return FALSE; /* repeat the insert */

src/getchar.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,17 @@ stuffReadbuff(s)
678678
add_buff(&readbuf1, s, -1L);
679679
}
680680

681+
/*
682+
* Append string "s" to the redo stuff buffer.
683+
* CSI and K_SPECIAL must already have been escaped.
684+
*/
685+
void
686+
stuffRedoReadbuff(s)
687+
char_u *s;
688+
{
689+
add_buff(&readbuf2, s, -1L);
690+
}
691+
681692
void
682693
stuffReadbuffLen(s, len)
683694
char_u *s;

src/proto/getchar.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ void AppendToRedobuffLit __ARGS((char_u *str, int len));
1515
void AppendCharToRedobuff __ARGS((int c));
1616
void AppendNumberToRedobuff __ARGS((long n));
1717
void stuffReadbuff __ARGS((char_u *s));
18+
void stuffRedoReadbuff __ARGS((char_u *s));
1819
void stuffReadbuffLen __ARGS((char_u *s, long len));
1920
void stuffReadbuffSpec __ARGS((char_u *s));
2021
void stuffcharReadbuff __ARGS((int c));

src/testdir/Make_amiga.mak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
4343
test_qf_title.out \
4444
test_changelist.out \
4545
test_eval.out \
46+
test_insertcount.out \
4647
test_options.out
4748

4849
.SUFFIXES: .in .out
@@ -174,4 +175,5 @@ test_listlbr_utf8.out: test_listlbr_utf8.in
174175
test_qf_title.out: test_qf_title.in
175176
test_changelist.out: test_changelist.in
176177
test_eval.out: test_eval.in
178+
test_insertcount.out: test_insertcount.in
177179
test_options.out: test_options.in

src/testdir/Make_dos.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
4242
test_qf_title.out \
4343
test_changelist.out \
4444
test_eval.out \
45+
test_insertcount.out \
4546
test_options.out
4647

4748
SCRIPTS32 = test50.out test70.out

src/testdir/Make_ming.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
6262
test_qf_title.out \
6363
test_changelist.out \
6464
test_eval.out \
65+
test_insertcount.out \
6566
test_options.out
6667

6768
SCRIPTS32 = test50.out test70.out

src/testdir/Make_os2.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
4040
test_autoformat_join.out \
4141
test_changelist.out \
4242
test_eval.out \
43+
test_insertcount.out \
4344
test_breakindent.out \
4445
test_listlbr.out \
4546
test_listlbr_utf8.out \

src/testdir/Make_vms.mms

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
103103
test_qf_title.out \
104104
test_changelist.out \
105105
test_eval.out \
106+
test_insertcount.out \
106107
test_options.out
107108

108109
# Known problems:

src/testdir/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
4040
test_qf_title.out \
4141
test_changelist.out \
4242
test_eval.out \
43+
test_insertcount.out \
4344
test_options.out
4445

4546
SCRIPTS_GUI = test16.out

src/testdir/test_insertcount.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Tests for repeating insert and replace.
2+
3+
STARTTEST
4+
:so small.vim
5+
:/Second
6+
4gro
7+
:/^First/,$wq! test.out
8+
:" get here when failed and in Insert mode
9+
:.wq! test.out
10+
ENDTEST
11+
12+
First line
13+
Second line
14+
Last line

0 commit comments

Comments
 (0)