From 5a7cf85c2c7e452563a4bce9195e9a3426ca3050 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 4 Feb 2025 07:44:41 +0800 Subject: vim-patch:9.1.1074: Strange error when heredoc marker starts with "trim" (#32317) 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: vim/vim#16574 https://github.com/vim/vim/commit/449c2e5454735fe1cfc8c21b2c6880d6bdf4cd6e --- test/old/testdir/test_python3.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/old/testdir/test_python3.vim') diff --git a/test/old/testdir/test_python3.vim b/test/old/testdir/test_python3.vim index c9dbc0b84e..2436587100 100644 --- a/test/old/testdir/test_python3.vim +++ b/test/old/testdir/test_python3.vim @@ -284,7 +284,10 @@ s+='B' python3 << trim eof s+='E' eof - call assert_equal('ABCDE', pyxeval('s')) + python3 << trimm +s+='F' +trimm + call assert_equal('ABCDEF', pyxeval('s')) endfunc " vim: shiftwidth=2 sts=2 expandtab -- cgit