1
0
forked from aniani/vim

patch 9.0.1573: error for function name has wrong line number

Problem:    Error for function name has wrong line number.
Solution:   Set the line number before giving the error.
This commit is contained in:
Bram Moolenaar
2023-05-23 14:48:42 +01:00
parent 50809a45eb
commit d4a9b7f614
3 changed files with 11 additions and 0 deletions

View File

@@ -4448,6 +4448,7 @@ exec_instructions(ectx_T *ectx)
CLEAR_FIELD(ea);
ea.cmd = ea.arg = iptr->isn_arg.string;
ga_init2(&lines_to_free, sizeof(char_u *), 50);
SOURCING_LNUM = iptr->isn_lnum;
define_function(&ea, NULL, &lines_to_free, 0);
ga_clear_strings(&lines_to_free);
}