private static int logicalToVisualLine(@NotNull Editor editor, int line) {
      return editor.logicalToVisualPosition(new LogicalPosition(line, 0)).line;
    }
private static int logicalToVisualLine(@NotNull Editor editor, int line)