]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(vim): Fix heredoc triggering misidentifcation of Vim9 script
authorDoug Kearns <dougkearns@gmail.com>
Sun, 28 Jun 2026 17:22:16 +0000 (17:22 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 28 Jun 2026 17:22:16 +0000 (17:22 +0000)
commit9a899af7e8e74bb094cfdfda857580b2e8ddf840
treefc5fb14870c1fd8cee7e68eee69485603bc30712
parent6e66ebc0fdd7804db4baa076e62c78d208adaeaf
runtime(vim): Fix heredoc triggering misidentifcation of Vim9 script

The following let-heredoc can cause legacy scripts to be misidentified
as Vim9 script if it appears early in the file.  Only match :vim9script
at the start of a line where it sensibly belongs.

let x =<< trim LINES
  vim9script
  ...
LINES

fixes:  #20647 (reported by Maxim Kim).
closes: #20654

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/vim.vim
runtime/syntax/generator/vim.vim.base
runtime/syntax/vim.vim