mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4770: cannot easily mix expression and heredoc
Problem: Cannot easily mix expression and heredoc. Solution: Support in heredoc. (Yegappan Lakshmanan, closes #10138)
This commit is contained in:
committed by
Bram Moolenaar
parent
68aaff4697
commit
efbfa867a1
@@ -1077,12 +1077,23 @@ get_function_body(
|
||||
|| checkforcmd(&p, "const", 5))))
|
||||
{
|
||||
p = skipwhite(arg + 3);
|
||||
if (STRNCMP(p, "trim", 4) == 0)
|
||||
while (TRUE)
|
||||
{
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
heredoc_trimmed = vim_strnsave(theline,
|
||||
skipwhite(theline) - theline);
|
||||
if (STRNCMP(p, "trim", 4) == 0)
|
||||
{
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
heredoc_trimmed = vim_strnsave(theline,
|
||||
skipwhite(theline) - theline);
|
||||
continue;
|
||||
}
|
||||
if (STRNCMP(p, "eval", 4) == 0)
|
||||
{
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
skip_until = vim_strnsave(p, skiptowhite(p) - p);
|
||||
getline_options = GETLINE_NONE;
|
||||
|
Reference in New Issue
Block a user