diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2022-01-01 18:34:50 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2022-01-01 18:34:50 +0100 |
commit | c96947b1c64c56f70125a9bac9c006f69e45d5d3 (patch) | |
tree | e15e44698144fdd94d00a28697708f03df7fa431 /extras/menu.vim | |
parent | f621f6c1eeadf73780ff7a7929a025a25a66702a (diff) | |
download | vim-polyglot-c96947b1c64c56f70125a9bac9c006f69e45d5d3.tar.gz vim-polyglot-c96947b1c64c56f70125a9bac9c006f69e45d5d3.zip |
Update
Diffstat (limited to 'extras/menu.vim')
-rw-r--r-- | extras/menu.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extras/menu.vim b/extras/menu.vim index e1765243..5f4e395e 100644 --- a/extras/menu.vim +++ b/extras/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' |