GNOME Bugzilla – Bug 392640
incorrectly placed curved lines between text panes
Last modified: 2013-07-03 16:50:00 UTC
Please describe the problem: This is a GUI glitch in Meld that I've seen for certain cases. Looks like it might be something to do with where Meld considered a change to start and stop, perhaps something to do with blank lines. Steps to reproduce: See attachment screenshot Actual results: See attached Expected results: The curved lines should extend on the right to the top and bottom of the highlighted region of text. Does this happen every time? yes Other information: image will be attached after report submitted
Created attachment 79366 [details] (partial) screenshot showing the visual glitch
I think this is related to the "ignore blank lines" option. Can you attach the relevant portions of the files and the status of that option? Thanks.
Created attachment 79797 [details] left-hand file
Created attachment 79798 [details] right-hand file
I have the 'ignore blank lines' box ticked. Above attachments will reproduce the glitch. Not sure if it makes any difference: I'm using "meld ." to do a svn diff. Cheers JP
Created attachment 115276 [details] Another screenshot of the bug I have this problem too. I think this is only happening whith blank lines before the text. For example, with this very simple file: > --1 > > a > --2 and this one: > --1 > --2 (This is the svn version (rev 1030), on gentoo linux)
It looks to me like the intention was to fully ignore the blank lines, meaning that they should not be not colored and the arrow buttons should not copy them. Note that ignoring blank lines is enabled by default. This is annoying in the common situation where a change inserts a blank lines plus some new lines. You usually want to revert or copy the whole change, including the blank line. Right now you have to add or remove it manually after pressing the arrow button. I still don't fully understand why trimming blank lines should be desireable. Related bugs are Bug #157873 and Bug #485253. I will attach a patch that changes the behaviour to only hide changes with nothing but blank lines.
Created attachment 115782 [details] [review] proposed fix: only ignore fully blank changes Side-Effects: This includes (and replaces) my fix for Bug #505087 and also fixes two other minor bugs: 1. no longer jump to the last blank changes if blank changes are ignored 2. no longer jump over blank changes if they are not ignored On a related note, _consume_blank_lines() had a bug that made it trim only from the top, never from the bottom. The patch replaces this function.
Created attachment 119401 [details] [review] proposed fix: only ignore fully blank changes (updated) Patch updated to latest svn, resolving a conflict.
Created attachment 129709 [details] [review] proposed fix: only ignore fully blank changes (updated again) Patch updated to latest SVN, resloving a conflict with the scrollbar drawing code.
Created attachment 129710 [details] screenshot before/after this patch Appart from fixing the problem with "forgetting" to jump to pure insertion/deletion changes, here is a screenshot how meld looks before and after this patch.
So this patch works for me in so far as it fixes these bugs. Speaking more generally, I suspect that the way that the 'Ignore blank lines' preference works means that it's never going to function quite as desired. As it stands, blank lines are only ignored *after* the diff has been calculated, which means that they have to be accounted for everywhere we do drawing, and it's very difficult to do trimming, or to get the cleaner comparison that would (hopefully) result from ignoring whitespace. I think the only way to fix this properly is to improve Meld's text filtering so that we can have filters that change the number of lines in the diff, at which point 'Ignore blank lines' becomes just another text filter.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.