summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-18 13:40:33 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-18 13:40:33 +0200
commitd87c21a918d8d611750f22d68fc638bf7a79b1d5 (patch)
tree62330bd19d4d244fa95af54533e3e54aa668013b
parent074f84c01fbe70554feb6a71c0d9cacf2ef77ca5 (diff)
downloadvim-git-d87c21a918d8d611750f22d68fc638bf7a79b1d5.tar.gz
patch 8.2.2865: skipping over function body failsv8.2.2865
Problem: Skipping over function body fails. Solution: Do not define the function when skipping.
-rw-r--r--src/userfunc.c5
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index b88b512c5..bc7d92384 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 fb7205065..5e2a52c1a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2865,
+/**/
2864,
/**/
2863,