forked from aniani/vim
patch 7.4.1692
Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed. Solution: Behave like ":normal". (Yasuhiro Matsumoto)
This commit is contained in:
@@ -11368,7 +11368,10 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
|
|
||||||
/* Avoid a 1 second delay when the keys start Insert mode. */
|
/* Avoid a 1 second delay when the keys start Insert mode. */
|
||||||
msg_scroll = FALSE;
|
msg_scroll = FALSE;
|
||||||
|
|
||||||
|
++ex_normal_busy;
|
||||||
exec_normal(TRUE);
|
exec_normal(TRUE);
|
||||||
|
--ex_normal_busy;
|
||||||
msg_scroll |= save_msg_scroll;
|
msg_scroll |= save_msg_scroll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,5 +6,9 @@ func Test_feedkeys_x_with_empty_string()
|
|||||||
call assert_equal('', getline('.'))
|
call assert_equal('', getline('.'))
|
||||||
call feedkeys('', 'x')
|
call feedkeys('', 'x')
|
||||||
call assert_equal('foo', getline('.'))
|
call assert_equal('foo', getline('.'))
|
||||||
|
|
||||||
|
" check it goes back to normal mode immediately.
|
||||||
|
call feedkeys('i', 'x')
|
||||||
|
call assert_equal('foo', getline('.'))
|
||||||
quit!
|
quit!
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -748,6 +748,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 */
|
||||||
|
/**/
|
||||||
|
1692,
|
||||||
/**/
|
/**/
|
||||||
1691,
|
1691,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user