LS4P icon indicating copy to clipboard operation
LS4P copied to clipboard

[BUG] Character range is offset sometimes

Open Efratror opened this issue 2 years ago • 0 comments

Bug:

Character positions on most language features can be offset by a few to the right. This comes from preprocessing adding a public access specifier when non is provided.

Possible solution:

Calculate the difference in string length from a line before and after preprocessing. After which the difference can be subtracted from the character position. If a access specifier is added in preprocessing the character position is offset to the correct location. If no keyword is added the lines are equal in length and no offset is required.

note: After some thought i won't be implementing this until tabs are supported (PR #29). Because it would need a refactor after merging.

Efratror avatar Apr 07 '22 06:04 Efratror