On Sunday, August 28, 2016 at 10:40:05 PM UTC+10, Bram Moolenaar wrote: > John Beckett wrote: >> It is a real problem that Vim can mislead the user into thinking there >> is no difference, when in fact a new line has been inserted at the top >> of the other window. Just scrolling one window to the top is not >> enough because unless you gg in *both* windows, you have no idea >> whether the files are identical or not. > > It's strange that in this case we get lots of useless "~" lines. > I wonder why that happens. Probably the top line in the window is > computed before the fold is closed. > > At least it helps a bit to set 'scrolloff' to 5 or more. > Hmm, perhaps we should add that to the defaults.
Thanks Bram for patch 7.4.2279, that's much better. However, the following shows there is still a frustration. Using gvim.exe 7.4.2290 Start Vim then execute the commands shown. gvim -N -u NONE :let lines = range(1, 999) :call writefile(lines, 'old.tmp') :call writefile(['inserted'] + lines, 'new.tmp') :e new.tmp :vert diffs old.tmp One way to execute the commands is to copy the lines to the clipboard. In Vim, type @+ Result: See two windows side-by-side. They appear to be identical, with each window showing: 1 2 3 4 5 6 +--993 lines: 7------ The cursor is on "1" at the top of the left-hand window. Pressing [c does nothing other than ring the bell. The only way I know to see that the two files are different is to switch to the right-hand window and scroll up ([c works). I'm never confident any more that a diff is showing everything. John -- -- 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.