Mercurial > vim
changeset 24653:0ef7bb28f2c3 v8.2.2865
patch 8.2.2865: skipping over function body fails
Commit: https://github.com/vim/vim/commit/d87c21a918d8d611750f22d68fc638bf7a79b1d5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 18 13:40:33 2021 +0200
patch 8.2.2865: skipping over function body fails
Problem: Skipping over function body fails.
Solution: Do not define the function when skipping.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 18 May 2021 13:45:03 +0200 |
parents | 9cf4f1cd73e3 |
children | f28527b7c2d3 |
files | src/userfunc.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -4014,7 +4014,10 @@ define_function(exarg_T *eap, char_u *na // 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; /*