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

patch 8.2.2865: skipping over function body fails

Problem:    Skipping over function body fails.
Solution:   Do not define the function when skipping.
This commit is contained in:
Bram Moolenaar
2021-05-18 13:40:33 +02:00
parent 074f84c01f
commit d87c21a918
2 changed files with 6 additions and 1 deletions

View File

@@ -4014,7 +4014,10 @@ define_function(exarg_T *eap, char_u *name_arg)
// Save the starting line number. // Save the starting line number.
sourcing_lnum_top = SOURCING_LNUM; sourcing_lnum_top = SOURCING_LNUM;
if (get_function_body(eap, &newlines, line_arg, &line_to_free) == FAIL) // Do not define the function when getting the body fails and when
// skipping.
if (get_function_body(eap, &newlines, line_arg, &line_to_free) == FAIL
|| eap->skip)
goto erret; goto erret;
/* /*

View File

@@ -750,6 +750,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 */
/**/
2865,
/**/ /**/
2864, 2864,
/**/ /**/