Bug 570740

Summary: [codeminings] mining placed between \r\n is not displayed, inconsistent display if placed on \n
Product: [Eclipse Project] Platform Reporter: Christoph Laeubrich <laeubi>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.14   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=570727
Whiteboard:

Description Christoph Laeubrich CLA 2021-01-29 05:06:10 EST
I have a very strange behavior on linux (have not tested windows/mac) with the codeminings.

Assume the following line:

1234567890\r\n

And this code:
> int line = 0;
> int offset = document.getLineOffset(line);
> int lineLength = document.getLineLength(line);
> new Position(offset + lineLength, 1);

This results is the code-mining be placed at the end

1234567890\r\n[mining]

No I have this line

1234567890\n

This results is the code-mining be placed at the *next* line

1234567890\n
[mining]

If I place the mining between \r\n
> new Position(offset + lineLength -1, 1);

it is completely invisible!