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 b88b512..bc7d923 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4014,7 +4014,10 @@
// 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;
/*