" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2025 Aug 29
+" Last Change: 2025 Sep 18
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
Vim9 syn match vimVar contained "\<\h\w*\ze<" nextgroup=vim9TypeArgs
-Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\=="
-Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.="
-Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
+Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\==\%(\s\|$\)"
+Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.=\%(\s\|$\)"
+Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<\s" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscript
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimOper contains=vim9Super,vim9This
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vim9Super,vim9This
|r+0#af5f00255&|e|d|i|r| +0#0000000&|@+0#e000e06&|a|>+0#af5f00255&@1| +0#0000000&@64
|r+0#af5f00255&|e|d|i|r| +0#0000000&|@+0#e000e06&|A|>+0#af5f00255&@1| +0#0000000&@64
@75
-@57|1|9|,|1| @9|4|8|%|
+@57|1|9|,|1| @9|2|5|%|
@75
|r+0#af5f00255&|e|d|i|r| +0#0000000&|E+0#e000e06&|N|D| +0#0000000&@65
@75
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|3|7|,|1| @9|B|o|t|
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|8|3|1|9| |(|r|e|d|i|r| |c|o|m@1|a|n|d| |n|o|t| |h|i|g|h|l|i|g|h|t|e|d| |i|n| |s|o|m|e| |c|a|s|e|s|)| +0#0000000&@14
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|V|i|m|9|C|o|n|t|e|x|t|(+0#e000e06&|)| +0#0000000&@57
+@57|3|7|,|1| @9|5|9|%|
--- /dev/null
+|d+0#af5f00255#ffffff0|e|f| +0#0000000&|V|i|m|9|C|o|n|t|e|x|t|(+0#e000e06&|)| +0#0000000&@57
+@75
+|v+0#af5f00255&|a|r| +0#0000000&|f+0#00e0e07&|o@1|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@59
+|i+0#af5f00255&|f| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@67
+@4|r+0#af5f00255&|e|d|i|r| +0#0000000&|=+0#af5f00255&|>| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@58
+@4>s+0#af5f00255&|m|i|l|e| +0#0000000&@65
+@4|r+0#af5f00255&|e|d|i|r| +0#0000000&|E+0#e000e06&|N|D| +0#0000000&@61
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@66
+@75
+|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|F|o@1| |{+0#e000e06&| +0#0000000&@61
+@4|r+0#af5f00255&|e|d|i|r| +0#0000000&|=+0#af5f00255&|>| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@58
+@4|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|h|e|l@1|o| |f|r|o|m| |c|m|d|"| +0#0000000&@49
+@4|r+0#af5f00255&|e|d|i|r| +0#0000000&|E+0#e000e06&|N|D| +0#0000000&@61
+|}+0#e000e06&| +0#0000000&@73
+@75
+|r+0#af5f00255&|e|d|i|r| +0#0000000&|=+0#af5f00255&|>| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@62
+|e+0#af5f00255&|c|h|o|m| +0#0000000&|"+0#e000002&|h|e|l@1|o| |g|l|o|b|a|l|"| +0#0000000&@54
+|r+0#af5f00255&|e|d|i|r| +0#0000000&|E+0#e000e06&|N|D| +0#0000000&@65
+@57|5@1|,|5| @9|9|4|%|
--- /dev/null
+|r+0#af5f00255#ffffff0|e|d|i|r| +0#0000000&|E+0#e000e06&|N|D| +0#0000000&@65
+@75
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|7|1|,|0|-|1| @7|B|o|t|
redir END
+
+" Issue #18319 (redir command not highlighted in some cases)
+
+def Vim9Context()
+
+var foo: string
+if true
+ redir => foo
+ smile
+ redir END
+endif
+echo foo
+
+command Foo {
+ redir => foo
+ echo "hello from cmd"
+ redir END
+}
+
+redir => foo
+echom "hello global"
+redir END
+
+enddef
+
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2025 Sep 08
+" Last Change: 2025 Sep 18
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
Vim9 syn match vimVar contained "\<\h\w*\ze<" nextgroup=vim9TypeArgs
-Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\=="
-Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.="
-Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
+Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\==\%(\s\|$\)"
+Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.=\%(\s\|$\)"
+Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<\s" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscript
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimOper contains=vim9Super,vim9This
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vim9Super,vim9This