diff src/testdir/test_popup.vim @ 15375:6012cc6936f7 v8.1.0695

patch 8.1.0695: internal error when using :popup commit https://github.com/vim/vim/commit/f42b45d719e03218735b3c2845a74dca9c0efd60 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 6 13:11:05 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 06 Jan 2019 13:15:09 +0100
parents 6a74cde86252
children 0375e54f0adc
line wrap: on
line diff
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -882,5 +882,18 @@ func Test_complete_o_tab()
   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