Bug 570740 - [codeminings] mining placed between \r\n is not displayed, inconsistent display if placed on \n
Summary: [codeminings] mining placed between \r\n is not displayed, inconsistent displ...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-29 05:06 EST by Christoph Laeubrich CLA
Modified: 2021-01-29 05:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!