Hi,

On Tue, May 18, 2021 at 1:41 PM Bram Moolenaar <[email protected]> wrote:
> *** ../vim-8.2.2864/src/userfunc.c      2021-05-18 11:47:31.884191326 +0200
> --- src/userfunc.c      2021-05-18 13:37:35.985264203 +0200
> ***************
> *** 4014,4020 ****
>       // Save the starting line number.
>       sourcing_lnum_top = SOURCING_LNUM;
>
> !     if (get_function_body(eap, &newlines, line_arg, &line_to_free) == FAIL)
>         goto erret;
>
>       /*
> --- 4014,4023 ----
>       // Save the starting line number.
>       sourcing_lnum_top = SOURCING_LNUM;
>
> !     // 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;

Reversing this condition (so, re-writing it to

if (eap->skip ||
get_function_body(eap, &newlines, line_arg, &line_to_free) == FAIL

) would make this case faster, and really skip getting the function
body. Or do you _need_ to get the function body here in order to go to
the correct spot in the script??

Christ van Willegen

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CA%2BOt1OwQUifNRe-aV2yagSrgRtZdVF2-mK9BKfU0yyVmf%2BGdMg%40mail.gmail.com.

Raspunde prin e-mail lui