public static boolean isCaretInVirtualSpace(@NotNull Editor editor) {
    return inVirtualSpace(editor, editor.getCaretModel().getLogicalPosition());
  }
public static boolean isCaretInVirtualSpace(@NotNull Editor editor)