GNOME Bugzilla – Bug 709580
meld highlights equivalent text as different
Last modified: 2014-02-08 23:02:18 UTC
I originally reported this here: https://bugs.gentoo.org/show_bug.cgi?id=486802 1. make these two files: a: <a a="a" b="b"> b: <a b="b" a="a"> 2. open them both in meld. (meld a b) 3. in the right editor (editing the file "b"), highlight the text, `b="b"` 4. cut the text (ctrl+x or right click -> cut) 5. press backspace 6. click right before the ">" 7. enter one space 8. paste the text (ctrl+v or right click -> paste) Your final result of "b" should looks like this (same as "a"): <a a="a" b="b"> Actual behavior: The pasted text is highlighted in read, although a banner appears saying the files are identical. See attached image. Expected behavior: Banner saying files are identical appears and there is no highlighting. tested on 1.7.0 and 1.8.1
Created attachment 256643 [details] screenshot of the bugged state
This bug here has to do with copy and paste. When we copy the text, the changed tags comes with it and is pasted back in to the buffer. We only clear those tags when we rehighlight that text; if the text is not classified as modified, we'll never rehighlight it. The workaround here is just to refresh the comparison, which should clear the highlighting and show what's expected. The fix is probably just to sanitise the text we paste to only ever be plaintext.
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.