runtime(vim): Update base-syntax, disallow '.' at start of menu item names (#14232)
Commit: https://github.com/vim/vim/commit/ec21bafc135a1e78d40e4fc9118e022bbab958e8 Author: dkearns <dougkea...@gmail.com> Date: Wed Mar 20 04:04:42 2024 +1100 runtime(vim): Update base-syntax, disallow '.' at start of menu item names (https://github.com/vim/vim/issues/14232) Disallow '.' at the start of a menu item name. This is the menu path separator character and should be escaped with a '\' in this case. Partially fixes #14230. "popup" is still incorrectly matched as the Ex command. Signed-off-by: Doug Kearns <dougkea...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 6527be425..46285f3db 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> " Doug Kearns <dougkea...@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Mar 18 +" Last Change: 2024 Mar 19 " Former Maintainer: Charles E. Campbell " Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Base File Version: 9.0-25 @@ -498,8 +498,8 @@ syn case match syn keyword vimMenu popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName syn region vimMenuRhs contained contains=@vimContinue,vimNotation start="|\@!\S" skip=+\\\|\|\| \s*\\| \s*"\ + end="$" matchgroup=vimSep end="|" syn region vimMenuRhsContinue contained contains=@vimContinue,vimNotation start=+^\s*\%(\\|"\ \)+ skip=+\\\|\|\| \s*\\| \s*"\ + end="$" matchgroup=vimSep end="|" -syn match vimMenuName "\%(\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs -syn match vimMenuName "\%(\\s\|\S\)\+\ze\s*$" contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue +syn match vimMenuName "\.\@!\%(\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs +syn match vimMenuName "\.\@!\%(\\s\|\S\)\+\ze\s*$" contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue syn match vimMenuNotation "& \|&&\|\\s\|\\." contained syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName syn match vimMenuMod " -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1rmd3K-00BLHR-TG%40256bit.org.