aboutsummaryrefslogtreecommitdiff
path: root/runtime/menu.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/menu.vim')
-rw-r--r--runtime/menu.vim14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/menu.vim b/runtime/menu.vim
index 3756787e7f..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.
@@ -356,8 +356,8 @@ func! s:SetupColorSchemes() abort
let s:did_setup_color_schemes = 1
let n = globpath(&runtimepath, "colors/*.vim", 1, 1)
- let n += globpath(&runtimepath, "pack/*/start/*/colors/*.vim", 1, 1)
- let n += globpath(&runtimepath, "pack/*/opt/*/colors/*.vim", 1, 1)
+ let n += globpath(&packpath, "pack/*/start/*/colors/*.vim", 1, 1)
+ let n += globpath(&packpath, "pack/*/opt/*/colors/*.vim", 1, 1)
" Ignore case for VMS and windows, sort on name
let names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
@@ -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