0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -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.
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;
/*