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

patch 8.2.3146: Vim9: line number wrong for :execute argument

Problem:    Vim9: line number wrong for :execute argument.
Solution:   Use the line number of the :execute command itself. (closes #8537)
This commit is contained in:
Bram Moolenaar
2021-07-11 16:52:45 +02:00
parent 4ece152ad6
commit c03fe66ade
3 changed files with 16 additions and 0 deletions

View File

@@ -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