mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
More meaningful column calculation for logical position in ImaginaryEditor
GitOrigin-RevId: 94c841b37751dea4b90c3a0999136ab543a30210
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cbfaeeccd0
commit
1333edfd4c
@@ -169,7 +169,7 @@ public class ImaginaryEditor extends UserDataHolderBase implements Editor {
|
||||
public LogicalPosition offsetToLogicalPosition(int offset) {
|
||||
Document document = getDocument();
|
||||
int line = document.getLineNumber(offset);
|
||||
int col = document.getLineStartOffset(line);
|
||||
int col = offset - document.getLineStartOffset(line);
|
||||
return new LogicalPosition(line, col);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user