Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
26707:d1af15dbf206 | 26708:f0d7cb510ce3 |
---|---|
1 " Vim support file to define the default menus | 1 " Vim support file to define the default menus |
2 " You can also use this as a start for your own set of menus. | 2 " You can also use this as a start for your own set of menus. |
3 " | 3 " |
4 " Maintainer: Bram Moolenaar <Bram@vim.org> | 4 " Maintainer: Bram Moolenaar <Bram@vim.org> |
5 " Last Change: 2020 Sep 28 | 5 " Last Change: 2021 Dec 22 |
6 | 6 |
7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work | 7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work |
8 " in all modes and avoid side effects from mappings defined by the user. | 8 " in all modes and avoid side effects from mappings defined by the user. |
9 | 9 |
10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise | 10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise |
715 " no directory or unlisted buffer | 715 " no directory or unlisted buffer |
716 if isdirectory(a:name) || !buflisted(a:num) | 716 if isdirectory(a:name) || !buflisted(a:num) |
717 return 0 | 717 return 0 |
718 endif | 718 endif |
719 | 719 |
720 " no name with control characters | |
721 if a:name =~ '[\x01-\x1f]' | |
722 return 0 | |
723 endif | |
724 | |
720 " no special buffer, such as terminal or popup | 725 " no special buffer, such as terminal or popup |
721 let buftype = getbufvar(a:num, '&buftype') | 726 let buftype = getbufvar(a:num, '&buftype') |
722 if buftype != '' && buftype != 'nofile' && buftype != 'nowrite' | 727 if buftype != '' && buftype != 'nofile' && buftype != 'nowrite' |
723 return 0 | 728 return 0 |
724 endif | 729 endif |