@NotNull
  public static HighlighterIterator createBeforeIterator(@NotNull Editor editor, int caretOffset) {
    return editor.getHighlighter().createIterator(caretOffset == 0 ? 0 : caretOffset - 1);
  }
@NotNull
  public static HighlighterIterator createBeforeIterator(@NotNull Editor editor, int caretOffset)