mirror of
https://github.com/neovim/neovim.git
synced 2026-03-06 17:17:21 +00:00
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
449c2e5454
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user