public static boolean inVirtualSpace(@NotNull Editor editor, int offset) {
    return offset == editor.getCaretModel().getOffset()
           && EditorCoreUtil.inVirtualSpace(editor, editor.getCaretModel().getLogicalPosition());
  }
public static boolean inVirtualSpace(@NotNull Editor editor, int offset)