mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:8.2.4948: cannot use Perl heredoc in nested :def function (#32311)
Problem: Cannot use Perl heredoc in nested :def function. (Virginia
Senioria)
Solution: Only concatenate heredoc lines when not in a nested function.
(closes vim/vim#10415)
d881d15984
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2471,6 +2471,7 @@ static int get_function_body(exarg_T *eap, garray_T *newlines, char *line_arg_in
|
||||
is_heredoc = true;
|
||||
}
|
||||
|
||||
if (!is_heredoc) {
|
||||
// Check for ":let v =<< [trim] EOF"
|
||||
// and ":let [a, b] =<< [trim] EOF"
|
||||
arg = p;
|
||||
@@ -2504,6 +2505,7 @@ static int get_function_body(exarg_T *eap, garray_T *newlines, char *line_arg_in
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add the line to the function.
|
||||
ga_grow(newlines, 1 + (int)sourcing_lnum_off);
|
||||
|
Reference in New Issue
Block a user