summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-11 16:52:45 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-11 16:52:45 +0200
commitc03fe66ade4c79a4eb5fc05d1d549c8f931a04b6 (patch)
treeabed0d47ce18c846909fcbbbf67bbddc3d1ef786 /src/eval.c
parent4ece152ad60c4fbd5b98b849a39b8ad9a987d319 (diff)
patch 8.2.3146: Vim9: line number wrong for :execute argumentv8.2.3146
Problem: Vim9: line number wrong for :execute argument. Solution: Use the line number of the :execute command itself. (closes #8537)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 6537ffea41..5dc1642a16 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6191,6 +6191,7 @@ ex_execute(exarg_T *eap)
char_u *p;
garray_T ga;
int len;
+ long start_lnum = SOURCING_LNUM;
ga_init2(&ga, 1, 80);
@@ -6244,6 +6245,9 @@ ex_execute(exarg_T *eap)
if (ret != FAIL && ga.ga_data != NULL)
{
+ // use the first line of continuation lines for messages
+ SOURCING_LNUM = start_lnum;
+
if (eap->cmdidx == CMD_echomsg || eap->cmdidx == CMD_echoerr)
{
// Mark the already saved text as finishing the line, so that what