comparison src/eval.c @ 25220:89b39ce243e2 v8.2.3146

patch 8.2.3146: Vim9: line number wrong for :execute argument Commit: https://github.com/vim/vim/commit/c03fe66ade4c79a4eb5fc05d1d549c8f931a04b6 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 11 16:52:45 2021 +0200 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 https://github.com/vim/vim/issues/8537)
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Jul 2021 17:00:04 +0200
parents 9ead67e3c696
children d26dc79c533f
comparison
equal deleted inserted replaced
25219:269f1e0a2cf1 25220:89b39ce243e2
6189 typval_T rettv; 6189 typval_T rettv;
6190 int ret = OK; 6190 int ret = OK;
6191 char_u *p; 6191 char_u *p;
6192 garray_T ga; 6192 garray_T ga;
6193 int len; 6193 int len;
6194 long start_lnum = SOURCING_LNUM;
6194 6195
6195 ga_init2(&ga, 1, 80); 6196 ga_init2(&ga, 1, 80);
6196 6197
6197 if (eap->skip) 6198 if (eap->skip)
6198 ++emsg_skip; 6199 ++emsg_skip;
6242 arg = skipwhite(arg); 6243 arg = skipwhite(arg);
6243 } 6244 }
6244 6245
6245 if (ret != FAIL && ga.ga_data != NULL) 6246 if (ret != FAIL && ga.ga_data != NULL)
6246 { 6247 {
6248 // use the first line of continuation lines for messages
6249 SOURCING_LNUM = start_lnum;
6250
6247 if (eap->cmdidx == CMD_echomsg || eap->cmdidx == CMD_echoerr) 6251 if (eap->cmdidx == CMD_echomsg || eap->cmdidx == CMD_echoerr)
6248 { 6252 {
6249 // Mark the already saved text as finishing the line, so that what 6253 // Mark the already saved text as finishing the line, so that what
6250 // follows is displayed on a new line when scrolling back at the 6254 // follows is displayed on a new line when scrolling back at the
6251 // more prompt. 6255 // more prompt.