diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-11 21:43:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 21:43:45 -0400 |
commit | 38930272009662cee1704dbb8dd0cd72260e6b05 (patch) | |
tree | 3656834701adfe25f1fb52e28afb6145061e19bd /runtime | |
parent | 9b77a2bf60e5190369f5ed8828d82f29e3e20ca5 (diff) | |
parent | fa9e5ab0ea2589dac3cef14086eb54a628c19999 (diff) | |
download | rneovim-38930272009662cee1704dbb8dd0cd72260e6b05.tar.gz rneovim-38930272009662cee1704dbb8dd0cd72260e6b05.tar.bz2 rneovim-38930272009662cee1704dbb8dd0cd72260e6b05.zip |
Merge pull request #14337 from janlazo/vim-8.2.0409
vim-patch:8.1.{1841,2416},8.2.{409,1920,2050}
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/delmenu.vim | 30 | ||||
-rw-r--r-- | runtime/menu.vim | 10 |
2 files changed, 23 insertions, 17 deletions
diff --git a/runtime/delmenu.vim b/runtime/delmenu.vim index 81df87d346..5c20290152 100644 --- a/runtime/delmenu.vim +++ b/runtime/delmenu.vim @@ -2,24 +2,30 @@ " Warning: This also deletes all menus defined by the user! " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2001 May 27 +" Last Change: 2019 Dec 10 aunmenu * -silent! unlet did_install_default_menus -silent! unlet did_install_syntax_menu -if exists("did_menu_trans") +unlet! g:did_install_default_menus +unlet! g:did_install_syntax_menu + +if exists('g:did_menu_trans') menutrans clear - unlet did_menu_trans + unlet g:did_menu_trans endif -silent! unlet find_help_dialog +unlet! g:find_help_dialog -silent! unlet menutrans_help_dialog -silent! unlet menutrans_path_dialog -silent! unlet menutrans_tags_dialog -silent! unlet menutrans_textwidth_dialog -silent! unlet menutrans_fileformat_dialog -silent! unlet menutrans_no_file +unlet! g:menutrans_fileformat_choices +unlet! g:menutrans_fileformat_dialog +unlet! g:menutrans_help_dialog +unlet! g:menutrans_no_file +unlet! g:menutrans_path_dialog +unlet! g:menutrans_set_lang_to +unlet! g:menutrans_spell_add_ARG_to_word_list +unlet! g:menutrans_spell_change_ARG_to +unlet! g:menutrans_spell_ignore_ARG +unlet! g:menutrans_tags_dialog +unlet! g:menutrans_textwidth_dialog " vim: set sw=2 : diff --git a/runtime/menu.vim b/runtime/menu.vim index cd56eb5583..78306a57b8 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -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: 2019 Jan 27 +" Last Change: 2019 Dec 10 " 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. @@ -690,11 +690,11 @@ func! s:BMShow(...) let g:bmenu_priority = a:1 endif - " remove old menu, if exists; keep one entry to avoid a torn off menu to - " disappear. - silent! unmenu &Buffers + " Remove old menu, if exists; keep one entry to avoid a torn off menu to + " disappear. Use try/catch to avoid setting v:errmsg + try | unmenu &Buffers | catch | endtry exe 'noremenu ' . g:bmenu_priority . ".1 &Buffers.Dummy l" - silent! unmenu! &Buffers + try | unmenu! &Buffers | catch | endtry " create new menu; set 'cpo' to include the <CR> let cpo_save = &cpo |