0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.3352: Vim9: error for nested :enddef has wrong line number

Problem:    Vim9: error for nested :enddef has wrong line number.
Solution:   Compute the line number.
This commit is contained in:
Bram Moolenaar
2021-08-15 19:28:05 +02:00
parent b033ee2ddf
commit 4bba16d252
3 changed files with 15 additions and 0 deletions

View File

@@ -822,6 +822,8 @@ get_function_body(
else if (*p != NUL && *p != (vim9_function ? '#' : '"')
&& (vim9_function || p_verbose > 0))
{
SOURCING_LNUM = sourcing_lnum_top
+ newlines->ga_len + 1;
if (eap->cmdidx == CMD_def)
semsg(_(e_text_found_after_enddef_str), p);
else