Christian Brabandt wrote: > On Do, 09 Mär 2017, Bram Moolenaar wrote: > > > > > Christian Brabandt wrote: > > > > > > On Mo, 06 Mär 2017, Bram Moolenaar wrote: > > > > > > > > > > > > > > Christian Brabandt wrote: > > > > > > > > > > > And another one that fixes the :move closes folds and :move > > > > > > invalidates > > > > > > folds: > > > > > > https://github.com/neovim/neovim/pull/6221 > > > > > > > > > > It's a bit big, but I suppose it's needed to make it work. > > > > > > > > > > Can someone turn this into a Vim patch? And check that it works, > > > > > removing the changed_lines() calls is a bit unexpected. > > > > > > That is called later down anyways, so I guess it is okay. > > > > > > > I'll check it out within the next days. > > > > > > Converted patch attached. I slightly renamed some functions, added some > > > static declarations and added some ifdefs and wrote a new test. From my > > > testing it looks good now. > > > > Thanks. Unfortunately, running the test without the patch doesn't fail. > > I thought the test should fail without applying the fix. > > I think that is because of patch 7.4.700, which recreates all folds > afterwards. So you would have to revert that patch. However I attach an > updated patch, where I add a test and make sure, that the first fold is > not closed after moving. So that should fail for current master and pre > 7.4.700 and the patch fixes that behaviour.
Thanks for the quick update. Unfortunately this test also fails after including the fix: Found errors in Test_move_folds_around(): function RunTheTest[21]..Test_move_folds_around line 26: Expected [-1, -1, -1, -1, -1, -1, -1, 8, 8, 8, 8, 8, -1, 14, 14, 14, 14, 14] but got [-1, 2, 2, 2, 2, 2, -1, 8, 8, 8, 8, 8, -1, 14, 14, 14, 14, 14] Did I miss something? If 7.4.700 should be undone first I suppose the patch would not apply cleanly, but it did. -- >From "know your smileys": 8<}} Glasses, big nose, beard /// Bram Moolenaar -- b...@moolenaar.net -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.