On Thu, Apr 03, 2008 at 06:16:32AM -0700, char101 wrote:
>
> On Apr 3, 1:41 pm, char101 <[EMAIL PROTECTED]> wrote:
> > the resulting gvim executable seems to be losing its regex capability,
> > for example typing abc and then searching for a does not work.
>
> After debugging the executable, it seems that the fault was 100%
> mine :D
>
> There is a compile error on regexp.c on this function which initial
> content was
>
> + regprog_T *
> +vim_regcomp(expr, re_flags)
> + char_u *expr;
> + int re_flags;
> +{
> + regprog_T *prog = nfa_regengine.regcomp(expr, re_flags);
> +
> + return prog ? : bt_regengine.regcomp(expr, re_flags);
> +}
>
> and without much thought I just change it into
>
> return prog ? NULL : bt_regengine.regcomp(expr, re_flags);
>
> which should actually be
>
> return prog ? bt_regengine.regcomp(expr, re_flags) : NULL;Based on previous discussions on the list, I don't think that's the intended behavior either. I'm pretty sure the logic is "If NFA compiler worked, return that otherwise return the BT compiled regex." This would translate to: return prog ? prog : bt_regengine.regcomp(expr, re_flags); -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature
