Merge pull request #1177 from NOLFXceptMe/vp-7.4.387

vim-patch:7.4.387
This commit is contained in:
Justin M. Keyes 2014-09-15 13:53:21 -04:00
commit 874296331b
6 changed files with 30 additions and 4 deletions

View File

@ -6919,8 +6919,9 @@ ins_esc (
State &= ~REPLACE_FLAG;
(void)start_redo_ins();
if (cmdchar == 'r' || cmdchar == 'v')
stuffReadbuff(ESC_STR); /* no ESC in redo buffer */
if (cmdchar == 'r' || cmdchar == 'v') {
stuffRedoReadbuff(ESC_STR); // No ESC in redo buffer
}
++RedrawingDisabled;
disabled_redraw = TRUE;
return FALSE; /* repeat the insert */

View File

@ -601,6 +601,13 @@ void stuffReadbuff(char_u *s)
add_buff(&readbuf1, s, -1L);
}
/// Append string "s" to the redo stuff buffer.
/// @remark CSI and K_SPECIAL must already have been escaped.
void stuffRedoReadbuff(char_u *s)
{
add_buff(&readbuf2, s, -1L);
}
void stuffReadbuffLen(char_u *s, long len)
{
add_buff(&readbuf1, s, len);

View File

@ -33,7 +33,8 @@ SCRIPTS := test_autoformat_join.out \
test106.out test107.out \
test_options.out \
test_listlbr.out test_listlbr_utf8.out \
test_breakindent.out
test_breakindent.out \
test_insertcount.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

@ -208,7 +208,7 @@ static int included_patches[] = {
//390,
//389,
388,
//387,
387,
//386,
//385,
//384 NA