mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2758: Vim9: wrong line number for autoload function with wrong name
Problem: Vim9: wrong line number for autoload function with wrong name. Solution: Set and restore SOURCING_LNUM. (closes #8100)
This commit is contained in:
@@ -4058,7 +4058,11 @@ define_function(exarg_T *eap, char_u *name_arg)
|
||||
}
|
||||
if (j == FAIL)
|
||||
{
|
||||
linenr_T save_lnum = SOURCING_LNUM;
|
||||
|
||||
SOURCING_LNUM = sourcing_lnum_top;
|
||||
semsg(_("E746: Function name does not match script file name: %s"), name);
|
||||
SOURCING_LNUM = save_lnum;
|
||||
goto erret;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user