From 17298a7912596c0009499b22493074f543d624d9 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 8 Jul 2017 06:44:36 -0400 Subject: runtime: update vimCommand syntax pattern (#6976) Update a flawed match pattern for the vimCommand syntax group. To see the effect of this fix, open a vimscript buffer, nvim -u NONE foo.vim configure a couple highlight groups, :hi! vimIsCommand ctermfg=Green :hi! vimCommand ctermfg=Red :syntax enable and add the following lines to the buffer: let foo=xFoo let bar=zBar You'll notice the "z" in zBar is Red, while xFoo and the rest of Bar are green. This will be the case as long as the word following `=` starts with the letter "z". This has already been fixed upstream by adding a "\>" word boundary to the match pattern: https://github.com/vim/vim/issues/124 https://github.com/vim/vim/commit/e2719096250a19ecdd9a35d13702879f163d2a50#diff-86da060e2153c8ce5dc317a7b4b5a29dR27 This particular match pattern was also mentioned in issue #5491, but in reference to a bug that was related to the generated part of syntax/vim.vim, whereas this bug lives in the non-generated part of the file. --- runtime/syntax/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/syntax/vim.vim') diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 85ced1ed3e..7025ee5369 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -21,7 +21,7 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " Special and plugin vim commands {{{2 -syn match vimCommand contained "\" syn keyword vimOnlyCommand contained fix[del] op[en] sh[ell] P[rint] syn keyword vimStdPlugin contained DiffOrig Man N[ext] S TOhtml XMLent XMLns -- cgit