int (@NotNull Editor editor, int logicalLine) { return ReadAction.compute(() -> { LogicalPosition logicalPosition = new LogicalPosition(logicalLine, 0); VisualPosition visualPosition = editor.logicalToVisualPosition(logicalPosition); return visualPosition.line; }); }