From: Bram Moolenaar Date: Tue, 18 May 2021 11:40:33 +0000 (+0200) Subject: patch 8.2.2865: skipping over function body fails X-Git-Tag: v8.2.2865 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87c21a918d8d611750f22d68fc638bf7a79b1d5;p=thirdparty%2Fvim.git patch 8.2.2865: skipping over function body fails Problem: Skipping over function body fails. Solution: Do not define the function when skipping. --- diff --git a/src/userfunc.c b/src/userfunc.c index b88b512c54..bc7d923843 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -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; /* diff --git a/src/version.c b/src/version.c index fb72050651..5e2a52c1a6 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2865, /**/ 2864, /**/