mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
874296331b
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
14
src/nvim/testdir/test_insertcount.in
Normal file
14
src/nvim/testdir/test_insertcount.in
Normal 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
|
3
src/nvim/testdir/test_insertcount.ok
Normal file
3
src/nvim/testdir/test_insertcount.ok
Normal file
@ -0,0 +1,3 @@
|
||||
First line
|
||||
ooooecond line
|
||||
Last line
|
@ -208,7 +208,7 @@ static int included_patches[] = {
|
||||
//390,
|
||||
//389,
|
||||
388,
|
||||
//387,
|
||||
387,
|
||||
//386,
|
||||
//385,
|
||||
//384 NA
|
||||
|
Loading…
Reference in New Issue
Block a user