0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2014-07-30 16:00:58 +02:00
parent 23fb7a9955
commit 4f5ce33d41
12 changed files with 39 additions and 1 deletions

View File

@@ -8389,7 +8389,7 @@ ins_esc(count, cmdchar, nomove)
(void)start_redo_ins(); (void)start_redo_ins();
if (cmdchar == 'r' || cmdchar == 'v') if (cmdchar == 'r' || cmdchar == 'v')
stuffReadbuff(ESC_STR); /* no ESC in redo buffer */ stuffRedoReadbuff(ESC_STR); /* no ESC in redo buffer */
++RedrawingDisabled; ++RedrawingDisabled;
disabled_redraw = TRUE; disabled_redraw = TRUE;
return FALSE; /* repeat the insert */ return FALSE; /* repeat the insert */

View File

@@ -678,6 +678,17 @@ stuffReadbuff(s)
add_buff(&readbuf1, s, -1L); 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 void
stuffReadbuffLen(s, len) stuffReadbuffLen(s, len)
char_u *s; char_u *s;

View File

@@ -15,6 +15,7 @@ void AppendToRedobuffLit __ARGS((char_u *str, int len));
void AppendCharToRedobuff __ARGS((int c)); void AppendCharToRedobuff __ARGS((int c));
void AppendNumberToRedobuff __ARGS((long n)); void AppendNumberToRedobuff __ARGS((long n));
void stuffReadbuff __ARGS((char_u *s)); void stuffReadbuff __ARGS((char_u *s));
void stuffRedoReadbuff __ARGS((char_u *s));
void stuffReadbuffLen __ARGS((char_u *s, long len)); void stuffReadbuffLen __ARGS((char_u *s, long len));
void stuffReadbuffSpec __ARGS((char_u *s)); void stuffReadbuffSpec __ARGS((char_u *s));
void stuffcharReadbuff __ARGS((int c)); void stuffcharReadbuff __ARGS((int c));

View File

@@ -43,6 +43,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test_qf_title.out \ test_qf_title.out \
test_changelist.out \ test_changelist.out \
test_eval.out \ test_eval.out \
test_insertcount.out \
test_options.out test_options.out
.SUFFIXES: .in .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_qf_title.out: test_qf_title.in
test_changelist.out: test_changelist.in test_changelist.out: test_changelist.in
test_eval.out: test_eval.in test_eval.out: test_eval.in
test_insertcount.out: test_insertcount.in
test_options.out: test_options.in test_options.out: test_options.in

View File

@@ -42,6 +42,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test_qf_title.out \ test_qf_title.out \
test_changelist.out \ test_changelist.out \
test_eval.out \ test_eval.out \
test_insertcount.out \
test_options.out test_options.out
SCRIPTS32 = test50.out test70.out SCRIPTS32 = test50.out test70.out

View File

@@ -62,6 +62,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test_qf_title.out \ test_qf_title.out \
test_changelist.out \ test_changelist.out \
test_eval.out \ test_eval.out \
test_insertcount.out \
test_options.out test_options.out
SCRIPTS32 = test50.out test70.out SCRIPTS32 = test50.out test70.out

View File

@@ -40,6 +40,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test_autoformat_join.out \ test_autoformat_join.out \
test_changelist.out \ test_changelist.out \
test_eval.out \ test_eval.out \
test_insertcount.out \
test_breakindent.out \ test_breakindent.out \
test_listlbr.out \ test_listlbr.out \
test_listlbr_utf8.out \ test_listlbr_utf8.out \

View File

@@ -103,6 +103,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test_qf_title.out \ test_qf_title.out \
test_changelist.out \ test_changelist.out \
test_eval.out \ test_eval.out \
test_insertcount.out \
test_options.out test_options.out
# Known problems: # Known problems:

View File

@@ -40,6 +40,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test_qf_title.out \ test_qf_title.out \
test_changelist.out \ test_changelist.out \
test_eval.out \ test_eval.out \
test_insertcount.out \
test_options.out test_options.out
SCRIPTS_GUI = test16.out SCRIPTS_GUI = test16.out

View File

@@ -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

View File

@@ -0,0 +1,3 @@
First line
ooooecond line
Last line

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
387,
/**/ /**/
386, 386,
/**/ /**/