mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
vim-patch:8.2.4770: cannot easily mix expression and heredoc
Problem: Cannot easily mix expression and heredoc.
Solution: Support in heredoc. (Yegappan Lakshmanan, closes vim/vim#10138)
efbfa867a1
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -2483,10 +2483,19 @@ void ex_function(exarg_T *eap)
|
||||
&& (!ASCII_ISALNUM(p[2])
|
||||
|| (p[2] == 't' && !ASCII_ISALNUM(p[3]))))) {
|
||||
p = skipwhite(arg + 3);
|
||||
if (strncmp(p, "trim", 4) == 0) {
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
heredoc_trimmed = xstrnsave(theline, (size_t)(skipwhite(theline) - theline));
|
||||
while (true) {
|
||||
if (strncmp(p, "trim", 4) == 0) {
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
heredoc_trimmed = xstrnsave(theline, (size_t)(skipwhite(theline) - theline));
|
||||
continue;
|
||||
}
|
||||
if (strncmp(p, "eval", 4) == 0) {
|
||||
// Ignore leading white space.
|
||||
p = skipwhite(p + 4);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
skip_until = xstrnsave(p, (size_t)(skiptowhite(p) - p));
|
||||
do_concat = false;
|
||||
|
Reference in New Issue
Block a user