]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1074: Strange error when heredoc marker starts with "trim" v9.1.1074
authorzeertzjq <zeertzjq@outlook.com>
Mon, 3 Feb 2025 17:56:16 +0000 (18:56 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 3 Feb 2025 17:56:16 +0000 (18:56 +0100)
commit449c2e5454735fe1cfc8c21b2c6880d6bdf4cd6e
tree77c617a6a9c4ab03571e845b810ef655945f84eb
parent23da16d3d023a20565dc29128208e6cb095231d9
patch 9.1.1074: Strange error when heredoc marker starts with "trim"

Problem:  Strange error when heredoc marker starts with "trim".
Solution: Check for whitespace after "trim" or "eval" (zeertzjq)

For :python3 etc., a heredoc marker that starts with a lower-case letter
is valid, and when it starts with "trim" it works in a script but not in
a function, and this PR makes it works in a function.
For :let, a heredoc marker that starts with a lower-case letter is not
valid, but when it starts with "trim" or "eval" the error can be a bit
confusing in a function, and this PR make it less confusing.

closes: #16574

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_let.vim
src/testdir/test_lua.vim
src/testdir/test_perl.vim
src/testdir/test_python2.vim
src/testdir/test_python3.vim
src/testdir/test_pyx2.vim
src/testdir/test_pyx3.vim
src/testdir/test_ruby.vim
src/userfunc.c
src/version.c