diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-12-05 02:04:19 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-12-04 23:04:19 -0800 |
commit | ed424655bef3169dc5452c5a8212e250dc483f9e (patch) | |
tree | 264515d63ef55a2449fd28cec807d6e5c52aeaa6 | |
parent | 3aa95ef27eb8817bc2ceddb6caf2b209e00a5e8d (diff) | |
download | rneovim-ed424655bef3169dc5452c5a8212e250dc483f9e.tar.gz rneovim-ed424655bef3169dc5452c5a8212e250dc483f9e.tar.bz2 rneovim-ed424655bef3169dc5452c5a8212e250dc483f9e.zip |
vim-patch:8.1.2385: open cmdline window with feedkeys() #11516
Problem: Opening cmdline window with feedkeys() does not work. (Yegappan
Lakshmanan)
Solution: Recognize K_CMDWIN also when ex_normal_busy is set.
https://github.com/vim/vim/commit/85db5475982e166ec5bb1c8c9a5c8bf062d49ed1
-rw-r--r-- | src/nvim/ex_getln.c | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 73353f84cf..8065d764b9 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -878,7 +878,9 @@ static int command_line_execute(VimState *state, int key) } if (s->c == cedit_key || s->c == K_CMDWIN) { - if (ex_normal_busy == 0 && got_int == false) { + // TODO(vim): why is ex_normal_busy checked here? + if ((s->c == K_CMDWIN || ex_normal_busy == 0) + && got_int == false) { // Open a window to edit the command line (and history). s->c = open_cmdwin(); s->some_key_typed = true; diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 262ea11eb6..9c3c33a943 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -750,3 +750,8 @@ func Test_cmdline_overstrike() let &encoding = encoding_save endfunc + +func Test_cmdwin_feedkeys() + " This should not generate E488 + call feedkeys("q:\<CR>", 'x') +endfunc |