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

patch 8.2.3633: Vim9: line number of lambda is off by one

Problem:    Vim9: line number of lambda is off by one.
Solution:   Add one to the line number. (closes #9083)
This commit is contained in:
Bram Moolenaar
2021-11-20 21:35:41 +00:00
parent 9cd9385db7
commit a755fdbe80
3 changed files with 17 additions and 1 deletions

View File

@@ -1491,7 +1491,7 @@ get_lambda_tv(
fp->uf_flags = flags;
fp->uf_calls = 0;
fp->uf_script_ctx = current_sctx;
fp->uf_script_ctx.sc_lnum += SOURCING_LNUM - newlines.ga_len;
fp->uf_script_ctx.sc_lnum += SOURCING_LNUM - newlines.ga_len + 1;
function_using_block_scopes(fp, evalarg->eval_cstack);