comparison src/vim9script.c @ 25423:3e56078569ca v8.2.3248

patch 8.2.3248: Vim9: error message for wrong input uses wrong line number Commit: https://github.com/vim/vim/commit/921ba529266c8dfc0809d41e1f084e26d25fffb1 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 29 22:25:05 2021 +0200 patch 8.2.3248: Vim9: error message for wrong input uses wrong line number Problem: Vim9: error message for wrong input uses wrong line number. Solution: Use the line number of the start of the command. (issue https://github.com/vim/vim/issues/8653)
author Bram Moolenaar <Bram@vim.org>
date Thu, 29 Jul 2021 22:30:05 +0200
parents f03271631eb5
children effe5f2b4d01
comparison
equal deleted inserted replaced
25422:7fde4d54b8b7 25423:3e56078569ca
409 int sid = -1; 409 int sid = -1;
410 int res; 410 int res;
411 int mult = FALSE; 411 int mult = FALSE;
412 garray_T names; 412 garray_T names;
413 garray_T as_names; 413 garray_T as_names;
414 long start_lnum = SOURCING_LNUM;
414 415
415 tv.v_type = VAR_UNKNOWN; 416 tv.v_type = VAR_UNKNOWN;
416 ga_init2(&names, sizeof(char_u *), 10); 417 ga_init2(&names, sizeof(char_u *), 10);
417 ga_init2(&as_names, sizeof(char_u *), 10); 418 ga_init2(&as_names, sizeof(char_u *), 10);
418 if (*arg == '{') 419 if (*arg == '{')
508 { 509 {
509 emsg(_(e_invalid_string_after_from)); 510 emsg(_(e_invalid_string_after_from));
510 goto erret; 511 goto erret;
511 } 512 }
512 cmd_end = arg; 513 cmd_end = arg;
514
515 // Give error messages for the start of the line.
516 SOURCING_LNUM = start_lnum;
513 517
514 /* 518 /*
515 * find script file 519 * find script file
516 */ 520 */
517 if (*tv.vval.v_string == '.') 521 if (*tv.vval.v_string == '.')