68671Re: Issue 120 in vim: folds are displayed incorrectly after uncaught error in try/endtry
- Mar 13, 2013Christian Brabandt wrote:
> On Tue, March 12, 2013 13:49, vim@... wrote:Where does the value of did_emsg get used then? It's not obvious,
> > Status: New
> > Owner: ----
> > Labels: Type-Defect Priority-Medium
> > New issue 120 by vlad.ir...@...: 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.
get_foldtext() doesn't check it.
Never overestimate a man's ability to underestimate a woman.
/// Bram Moolenaar -- Bram@... -- 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 vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic Next post in topic >>