diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-14 21:34:59 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-14 21:34:59 +0100 |
commit | e41decc892a115335259096c3bc0204dd99b372b (patch) | |
tree | 45f16ad3fce28d98a5f9f259f16be11c37f0671a /src/testdir/test_terminal.vim | |
parent | 6453cc8078af403956d0e8c1849cf5ec0aae86b2 (diff) | |
download | vim-git-e41decc892a115335259096c3bc0204dd99b372b.tar.gz |
patch 8.2.1988: still in Insert mode when opening terminal popupv8.2.1988
Problem: Still in Insert mode when opening terminal popup with a <Cmd>
mapping in Insert mode.
Solution: Exit Insert mode. (closes #7295)
Diffstat (limited to 'src/testdir/test_terminal.vim')
-rw-r--r-- | src/testdir/test_terminal.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 8d68ceb5b..7d6bdbcf6 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1237,6 +1237,24 @@ func Test_terminal_popup_with_cmd() unlet s:winid endfunc +func Test_terminal_popup_insert_cmd() + CheckUnix + + inoremap <F3> <Cmd>call StartTermInPopup()<CR> + func StartTermInPopup() + call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true})->popup_create(#{highlight: 'Pmenu'}) + endfunc + call feedkeys("i\<F3>") + sleep 10m + call assert_equal('n', mode()) + + call feedkeys("\<C-D>", 'xt') + sleep 20m + call feedkeys(":q\<CR>", 'xt') + delfunc StartTermInPopup + iunmap <F3> +endfunc + func Check_dump01(off) call assert_equal('one two three four five', trim(getline(a:off + 1))) call assert_equal('~ Select Word', trim(getline(a:off + 7))) |