GNOME Bugzilla – Bug 157873
Draw hidden differences unobtrusively.
Last modified: 2009-08-15 18:40:50 UTC
1. Prepare two files that differ by one empty line. 2. Open a file diff with them 3. The diff is displayed on the diff bar, but is not between the files. The screenshot will be available soon.
Created attachment 33647 [details] [review] Bug fix
Ah, file diff / ignore blank lines was not hooked up to the gui. Also its enabled by default. Try the attached patch or update to branch-0_9 if you're using cvs.
You are really quick %-) Yes, I'm on CVS. Anyway, for the history - the screenshot.
Created attachment 33648 [details] Screenshot
Well, the current situation (with your patch applied) is the following. When 'Ignore blank lines' is off, everything goes ok. However, when 'Ignore blank lines' is on, diffmaps still show there's a difference and mouse wheel scrolling still stumbles upon them. Visually, it is the very same thing as on the screenshot. I tried to dig into the code and will post a rough patch in a couple of minutes. The patch, however, does not fix using the wheel to pass to (not displayed in any way now) diff, which is very embarassing. And it doesn't take into account the case when there's the only diff and it consists of one blank line. What I thought about is that maybe it is reasonable to alter the diffutil.Differ so that it is able to ignore blank lines in diffs.
Created attachment 33714 [details] [review] When 'Ignore blank lines' is set, removes blank lines from diffmaps
Thanks for the patch Alexey. The idea was originally to show "hidden" diffs unobtrusively. For instance in dirdiff, if two files are different but compare identically because of filters, they are shown in italics. I'd like something similar for filediff. Perhaps draw the diffmaps and linkmaps with a faint line. Probably next/prev diff should skip these.
I've got the idea. I'll think over it and maybe propose another patch :)
Right, next&prev skip hidden changes. The outline is not drawn in the diffmap for hidden changes (but is filled) I think that should cover it.
Batch close of old bugs.