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 #3765)
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 287d59d..663a6a8 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -882,5 +882,18 @@
delfunc s:act_on_text_changed
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
" vim: shiftwidth=2 sts=2 expandtab