Christian Brabandt wrote:

> On Tue, March 12, 2013 13:49, [email protected] wrote:
> > Status: New
> > Owner: ----
> > Labels: Type-Defect Priority-Medium
> >
> > New issue 120 by [email protected]: folds are displayed incorrectly
> > after uncaught error in try/endtry
> > http://code.google.com/p/vim/issues/detail?id=120
> >
> > What steps will reproduce the problem?
> >
> > Execute the following code. I use netrw help file as an example because
> > it's a large file with many folds.
> >
> > "-----BEGIN-----------------------------
> > edit $VIMRUNTIME/doc/pi_netrw.txt
> > " Change 'foldtext' to something different from default.
> > set foldtext=getline(v:foldstart)
> > set fdm=marker fdl=0
> > normal! ggzjzt
> > split
> > try
> >      throw 'oopsy-doopsy'
> > finally
> > endtry
> > "-----END-------------------------------
> >
> >
> > What is the expected output? What do you see instead?
> >
> > The result is that some or all folded lines are displayed with the wrong
> > value of 'foldtext' in both windows.
> > The display is corrected after Ctrl-L or after the cursor is moved.
> >
> >
> 
> I think, this happens, because after the error, did_emsg isn't reset yet
> when calling the foldtext() function. I am not sure, if it is safe to
> reset did_emsg in main_loop() earlier, but at the very least, we
> can guard updatescreen(0) by temporarily resetting did_emsg, like the
> attached patch does.

Where does the value of did_emsg get used then?  It's not obvious,
get_foldtext() doesn't check it.

-- 
Never overestimate a man's ability to underestimate a woman.

 /// 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