On Jan 28, 5:43 am, Lech Lorens <[email protected]> wrote:
>
> I believe this problem is what I observed some time ago: the properties
> of folds are not set to state-depends-on-size when foldmethod is changed. You
> can try this by opening the first of the files, setting foldmethod to syntax,
> going to the first fold, opening it and then executing:
> :diffsplit file2.c
> The first fold in file1.c should be open.

Yes, this is exactly what happens.

>
> I believe the attached patch fixes the problem. However, I did not give it
> enough time to be sure that this is the optimal solution.
>

The patch seems to fix both problems (the second file having an open
fold, and the first having one when manipulated as you suggest. Good
work!

I haven't gotten a chance yet to mess with Vim's source code, so I
don't have any opinion one way or another as to how optimal the
solution is. But it's a pretty small patch.

Unfortunately I don't have a setup to compile Vim myself at work on my
Windows machine, so I probably won't be trying it out too often, but
for what it's worth I'll keep using this patch on my Ubuntu install at
home to see if I notice anything out of place.

-- 
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui