int (@NotNull LineMarkerInfo<?> lineMarkerInfo, @NotNull Document document) { int offset = lineMarkerInfo.separatorPlacement == SeparatorPlacement.TOP ? lineMarkerInfo.startOffset : lineMarkerInfo.endOffset; return document.getLineNumber(MathUtil.clamp(offset, 0, document.getTextLength())) + (lineMarkerInfo.separatorPlacement == SeparatorPlacement.TOP ? 0 : 1); }