0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2265: error message for missing endfunc/enddef is last line

Problem:    Error message for missing endfunc/enddef is last line.
Solution:   Report the line where the function starts. (closes #7582)
This commit is contained in:
Bram Moolenaar
2021-01-01 18:54:34 +01:00
parent 5178b1b02f
commit b8ba9b9197
3 changed files with 22 additions and 0 deletions

View File

@@ -3352,6 +3352,8 @@ define_function(exarg_T *eap, char_u *name_arg)
lines_left = Rows - 1;
if (theline == NULL)
{
// Use the start of the function for the line number.
SOURCING_LNUM = sourcing_lnum_top;
if (skip_until != NULL)
semsg(_(e_missing_heredoc_end_marker_str), skip_until);
else if (eap->cmdidx == CMD_def)