diff runtime/menu.vim @ 26708:f0d7cb510ce3

Update runtime files Commit: https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 24 13:18:38 2021 +0000 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Dec 2021 14:30:04 +0100
parents 445799159195
children f37561549ec2
line wrap: on
line diff
--- 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'