]> granicus.if.org Git - vim/commitdiff
patch 8.2.1768: cannot use the help menu from a terminal window v8.2.1768
authorBram Moolenaar <Bram@vim.org>
Mon, 28 Sep 2020 19:41:49 +0000 (21:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 28 Sep 2020 19:41:49 +0000 (21:41 +0200)
Problem:    Cannot use the help menu from a terminal window.
Solution:   Add ":tlnoremenu" commands. (Yee Cheng Chin, closes #7023)

runtime/menu.vim
src/testdir/test_gui.vim
src/version.c

index 60e956c08b398032c22ab2815ea4de10bd185ee5..e17652432deaec4a4e3a02a553990479ec63a2dd 100644 (file)
@@ -2,7 +2,7 @@
 " You can also use this as a start for your own set of menus.
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Mar 29
+" Last Change: 2020 Sep 28
 
 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
 " in all modes and avoid side effects from mappings defined by the user.
@@ -89,6 +89,21 @@ an 9999.75 &Help.-sep2-                      <Nop>
 an 9999.80 &Help.&Version              :version<CR>
 an 9999.90 &Help.&About                        :intro<CR>
 
+if exists(':tlmenu')
+  tlnoremenu 9999.10 &Help.&Overview<Tab><F1>          <C-W>:help<CR>
+  tlnoremenu 9999.20 &Help.&User\ Manual               <C-W>:help usr_toc<CR>
+  tlnoremenu 9999.30 &Help.&How-To\ Links              <C-W>:help how-to<CR>
+  tlnoremenu <silent> 9999.40 &Help.&Find\.\.\.                <C-W>:call <SID>Helpfind()<CR>
+  tlnoremenu 9999.45 &Help.-sep1-                      <Nop>
+  tlnoremenu 9999.50 &Help.&Credits                    <C-W>:help credits<CR>
+  tlnoremenu 9999.60 &Help.Co&pying                    <C-W>:help copying<CR>
+  tlnoremenu 9999.70 &Help.&Sponsor/Register           <C-W>:help sponsor<CR>
+  tlnoremenu 9999.70 &Help.O&rphans                    <C-W>:help kcc<CR>
+  tlnoremenu 9999.75 &Help.-sep2-                      <Nop>
+  tlnoremenu 9999.80 &Help.&Version                    <C-W>:version<CR>
+  tlnoremenu 9999.90 &Help.&About                      <C-W>:intro<CR>
+endif
+
 fun! s:Helpfind()
   if !exists("g:menutrans_help_dialog")
     let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')"
index 64537ac753bd140a9367daf8b3f35ef50bf4c06a..89ec3a912ef451b78af21c5bdc41062955f24f22 100644 (file)
@@ -739,6 +739,9 @@ func Test_menu()
 
   " Check deleting menu doesn't cause trouble.
   aunmenu Help
+  if exists(':tlmenu')
+    tlunmenu Help
+  endif
   call assert_fails('menu Help', 'E329:')
 endfunc
 
index 8cfa149cc0f5f4e12250b0227bb1971c0741172c..5d84e242d5e2557b4ba00595455391da3b8ba4e9 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1768,
 /**/
     1767,
 /**/