diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-05-18 13:40:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-18 13:40:33 +0200 |
commit | d87c21a918d8d611750f22d68fc638bf7a79b1d5 (patch) | |
tree | 62330bd19d4d244fa95af54533e3e54aa668013b /src/userfunc.c | |
parent | 074f84c01fbe70554feb6a71c0d9cacf2ef77ca5 (diff) | |
download | vim-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.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 5 |
1 files changed, 4 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; /* |