On Wednesday, June 13, 2012 8:33:08 AM UTC-5, Bram Moolenaar wrote: > > I'm not sure including this patch will not cause problems. The code > assumes there is always at least one unchanged lines between diff > blocks. When two blocks are touching (no line in between) that means > they should actually be one block. >
Actually the current patch does cause one problem, as I noted earlier in the thread. Somehow the leading diff filler is missing but the changes are aligned anyway, causing one of the windows to jump out of alignment when switching back and forth between them. > Changing the assumption is tricky, it might work in some cases but not > always. It may cause problems for commands like "do" and "dp". > We would at least need some good tests to make sure nothing breaks. > What sort of tests would you want to see? Make a diffexpr to return adjacent diffs and test that do, dp, :diffget, and :diffput still work on those blocks and also non-adjacent ones? Repeat with default diff output? I've never messed with the test suite before (does it work on Windows?) but I'd be willing to look into it if there's a patch to support adjacent-but-separate hunks in the diff output. -- 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
