summaryrefslogtreecommitdiffstats
path: root/runtime/menu.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-24 13:18:38 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-24 13:18:38 +0000
commitfa3b72348d88343390fbe212cfc230fec1602fc2 (patch)
treec0f27c44f2819613a4288bfc6ebc5c58f421d90d /runtime/menu.vim
parentd3f00f54bf955bd01767db3a0af25866bc112ec7 (diff)
Update runtime files
Diffstat (limited to 'runtime/menu.vim')
-rw-r--r--runtime/menu.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/menu.vim b/runtime/menu.vim
index e17652432d..5f4e395e12 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: 2020 Sep 28
+" Last Change: 2021 Dec 22
" 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.
@@ -717,6 +717,11 @@ func s:BMCanAdd(name, num)
return 0
endif
+ " no name with control characters
+ if a:name =~ '[\x01-\x1f]'
+ return 0
+ endif
+
" no special buffer, such as terminal or popup
let buftype = getbufvar(a:num, '&buftype')
if buftype != '' && buftype != 'nofile' && buftype != 'nowrite'