forked from aniani/vim
patch 9.0.1573: error for function name has wrong line number
Problem: Error for function name has wrong line number. Solution: Set the line number before giving the error.
This commit is contained in:
@@ -166,6 +166,14 @@ def Test_wrong_function_name()
|
|||||||
delfunc g:Define
|
delfunc g:Define
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_listing_function_error()
|
||||||
|
var lines =<< trim END
|
||||||
|
var filler = 123
|
||||||
|
func DoesNotExist
|
||||||
|
END
|
||||||
|
v9.CheckDefExecFailure(lines, 'E123:', 2)
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_break_in_skipped_block()
|
def Test_break_in_skipped_block()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1573,
|
||||||
/**/
|
/**/
|
||||||
1572,
|
1572,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -4448,6 +4448,7 @@ exec_instructions(ectx_T *ectx)
|
|||||||
CLEAR_FIELD(ea);
|
CLEAR_FIELD(ea);
|
||||||
ea.cmd = ea.arg = iptr->isn_arg.string;
|
ea.cmd = ea.arg = iptr->isn_arg.string;
|
||||||
ga_init2(&lines_to_free, sizeof(char_u *), 50);
|
ga_init2(&lines_to_free, sizeof(char_u *), 50);
|
||||||
|
SOURCING_LNUM = iptr->isn_lnum;
|
||||||
define_function(&ea, NULL, &lines_to_free, 0);
|
define_function(&ea, NULL, &lines_to_free, 0);
|
||||||
ga_clear_strings(&lines_to_free);
|
ga_clear_strings(&lines_to_free);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user