diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-06-30 19:54:03 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-01 10:17:39 +0800 |
| commit | d81d8d454a151c60f4281c904e387661712b7984 (patch) | |
| tree | 119550101bf02121347d12e35959bf65049a2fde /src/nvim/testdir | |
| parent | 015778a3817178a8fdc1150ef1b0eaa3dde776f1 (diff) | |
| download | rneovim-d81d8d454a151c60f4281c904e387661712b7984.tar.gz rneovim-d81d8d454a151c60f4281c904e387661712b7984.tar.bz2 rneovim-d81d8d454a151c60f4281c904e387661712b7984.zip | |
vim-patch:8.1.0695: internal error when using :popup
Problem: Internal error when using :popup.
Solution: When a menu only exists in Terminal mode give an error. (Naruhiko
Nishino, closes vim/vim#3765)
https://github.com/vim/vim/commit/f42b45d719e03218735b3c2845a74dca9c0efd60
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_popup.vim | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim index 9a31f61582..48358f71b8 100644 --- a/src/nvim/testdir/test_popup.vim +++ b/src/nvim/testdir/test_popup.vim @@ -913,7 +913,7 @@ func Test_popup_complete_backwards_ctrl_p() bwipe! endfunc -fun! Test_complete_o_tab() +func Test_complete_o_tab() CheckFunction test_override let s:o_char_pressed = 0 @@ -922,7 +922,7 @@ fun! Test_complete_o_tab() let s:o_char_pressed = 0 call feedkeys("\<c-x>\<c-n>", 'i') endif - endf + endfunc set completeopt=menu,noselect new @@ -941,7 +941,21 @@ fun! Test_complete_o_tab() bwipe! set completeopt& delfunc s:act_on_text_changed -endf +endfunc + +func Test_menu_only_exists_in_terminal() + if !exists(':tlmenu') || has('gui_running') + return + endif + tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+ + aunmenu * + try + popup Edit + call assert_false(1, 'command should have failed') + catch + call assert_exception('E328:') + endtry +endfunc func Test_popup_complete_info_01() new |