Christian Brabandt wrote:

> Hi Ein!
> 
> On Fr, 24 Mai 2013, Ein Brown wrote:
> 
> > Hi, I have encountered a bug where my folds become 'corrupted' and 
> > unrecognized by vim.  I looks like this is caused by using :move on a 
> > closed fold under the right circumstances.
> > 
> > The SO question has more details:
> > http://stackoverflow.com/questions/16592654/in-vim-why-is-move-randomly-corrupting-my-folds
> > 
> > at the bottom of the SO question (under 'edit') I explain ways to run into 
> > the bug without the Alt-Up / Alt-Down mapping.
> 
> I just saw the problem yesterday. Here is an simpler example of the bug:
> #v+
> chrisbra@R500 % cat foldmarker_bug.txt 
> vim: fdm=marker
> 
> 
> 
> fold A {{{
> some
>     text
>         here
> }}}
> fold B {{{
> some
>     text
>         here
> }}}
> fold C {{{
> some
>     text
>         here
> }}}
> fold D {{{
> some
>     text
>         here
> }}}
> chrisbra@R500 vim -u NONE -N foldmarker_bug.txt
> :10
> :4m
> #v-
> 
> Note, that the fold B stays open and it is not possible to close 
> it. Debugging it with gdb, you'll find, that wp->w_folds get invalid 
> (e.g. is out of order).
> 
> I think this patch fixes it.

[...]

Thanks.

> BTW: I think, there is also an error in fold.c:

[...]

Yep.


-- 
I once paid $12 to peer at the box that held King Tutankhamen's little
bandage-covered midget corpse at the De Young Museum in San Francisco.  I
remember thinking how pleased he'd be about the way things turned out in his
afterlife.
                                (Scott Adams - The Dilbert principle)

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