mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.1491: Vim9: crash when compiling heredoc lines start with comment
Problem: Vim9: crash when compiling heredoc lines start with comment. Solution: Skip over NULL pointers. Do not remove comment and empty lines when fetching function lines. (closes #6743)
This commit is contained in:
@@ -2705,12 +2705,12 @@ getexline(
|
||||
int c, // normally ':', NUL for ":append"
|
||||
void *cookie UNUSED,
|
||||
int indent, // indent for inside conditionals
|
||||
int do_concat)
|
||||
getline_opt_T options)
|
||||
{
|
||||
// When executing a register, remove ':' that's in front of each line.
|
||||
if (exec_from_reg && vpeekc() == ':')
|
||||
(void)vgetc();
|
||||
return getcmdline(c, 1L, indent, do_concat);
|
||||
return getcmdline(c, 1L, indent, options);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2725,7 +2725,7 @@ getexmodeline(
|
||||
// :s prompt
|
||||
void *cookie UNUSED,
|
||||
int indent, // indent for inside conditionals
|
||||
int do_concat UNUSED)
|
||||
getline_opt_T options UNUSED)
|
||||
{
|
||||
garray_T line_ga;
|
||||
char_u *pend;
|
||||
|
Reference in New Issue
Block a user