True Human Design
 
Read Thread
◀ Back to Forum

 422 views
 3 replies

John Y. Bug report - highlight on wrong line 2020-12-08 20:48:44
Sometimes the highlighted area isn't where the diff is. See the following:

https://postimg.cc/QV0xpvM9

The correct line number is shown in bold, but the wrong text is highlighted. I would guess it has something to do with the ridiculously long line earlier in the comparison.



Anders Re: Bug report - highlight on wrong line 2020-12-08 22:15:57
Admin:
Thanks for the bug report and screenshot.
Yes very long lines can cause issues but good that you reported it. It is on the very long todo...

S.W. Re: Bug report - highlight on wrong line 2021-06-23 20:57:55
I found another instance of this error. The files being compared contain some very long lines (more then 10.000 (ten thousand; 10^5) characters.

In my case, two successive lines were very long and were split across two display lines. The next two lines were short, and the fourth line had differences.

The fourth DISPLAY line was shaded, indicating that there were differences somewhere in the line. The sixth DISPLAY line (which is the fourth REAL line) had the actual differences highlighted.

So the actual differences are being highlighted correctly. But the whole-line shading is wrong because of previous very long lines.

Let's describe it another way. Here is what's in the files being compared:
1 very long line with lots and lots and lots of stuff, same as other file
2 another very long line with lots and lots and lots of stuff, same as other file
3 short line, same as other file
4 line that differs from other file

And here is how those files are displayed:
Line Content
A 1 very long line with lots and lots and lots of
B stuff, same as other file
C 2 another very long line with lots and lots and
D lots of stuff, same as other file (shaded)
E 3 short line, same as other file
F 4 line that differs from other file (highlighted)

Line D is shaded, indicating that there are differences somewhere in the line.

Lne F has the actual differences highlighted.

I believe that highlighting of actual differences is being done by one block of code, and shading the entire line is being done by a different block of code. The whole-line shading code does not know about very long lines, and so it shades the wrong display line. The fourth line in the file has differences, so the shading code shades the fourth DISPLAY line (which is the second half of the second REAL line).

Anders Re: Bug report - highlight on wrong line 2021-06-24 05:16:15
Admin:
Thank you for the bug report.