0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.0056: wrong line number reported when :cexpr fails in :def function

Problem:    Wrong line number reported when :cexpr fails in :def function.
Solution:   Set line_number before executing :cexpr. (closes #10735)
This commit is contained in:
Bram Moolenaar
2022-07-18 17:49:03 +01:00
parent fa49eb4827
commit bd683e3a79
3 changed files with 15 additions and 0 deletions

View File

@@ -2786,6 +2786,7 @@ exec_instructions(ectx_T *ectx)
ea.cmdlinep = &iptr->isn_arg.cexpr.cexpr_ref->cer_cmdline;
--ectx->ec_stack.ga_len;
tv = STACK_TV_BOT(0);
SOURCING_LNUM = iptr->isn_lnum;
res = cexpr_core(&ea, tv);
clear_tv(tv);
if (res == FAIL)