Christian Brabandt wrote:

> >> Hi Bram!
> >>
> >> On Mi, 13 M=E4r 2013, Bram Moolenaar wrote:
> >>
> >> > What should happen is when evaluating 'foldtext' it should check if
> >> this
> >> > results in an error, and then stop evaluating it.  Like what happens
> >> in
> >> > win_line() with b_syn_error.  It's a bit more work, but it's probably
> >> > the right way to do it.
> >> >=20
> >>
> >> I didn't want to add yet another variable to the win_T struct, so I
> >> made=20
> >> get_foldtext() check, whether the last time it run, it was still on
> >> the=20
> >> same window and some lines before, otherwise, we at least check once,=20
> >> whether the current foldtext setting succeeds and if not, we skip=20
> >> evaluating the foldtext setting for the rest of the folds in the
> >> current=20
> >> window. (See attached patch)
> >
> > I'm missing something: The original problem was triggered because
> > emsg_off was set.  But with this patch it's still set.  So don't we
> > still have the problem with the try/catch?
> >
> It temporarily reset did_emsg:
> +    if (!got_fdt_error)
> +        did_emsg = FALSE; /* might not yet been reset from a previous
> error */

Unless I'm missing something, that is not enough.  In emsg() there is a
check for emsg_off (in emsg_not_now()), and if emsg_off is set then it
doesn't get to throwing an exception.

-- 
hundred-and-one symptoms of being an internet addict:
72. Somebody at IRC just mentioned a way to obtain full motion video without
    a PC using a wireless protocol called NTSC, you wonder how you never
    heard about it

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui