diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 11f7ec9f1..3621d4eec 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -398,15 +398,16 @@ with `org-cycle')." (unless (eq this-command 'org-shifttab) (save-excursion (org-beginning-of-line) - (when (and (org-at-heading-p) - (or org-cycle-open-archived-trees - (not (member org-archive-tag (org-get-tags)))) - (or (not arg) - (outline-invisible-p (line-end-position)))) - (outline-toggle-children) - (unless (outline-invisible-p (line-end-position)) - (org-cycle-hide-drawers 'subtree)) - t)))) + (let (invisible-p) + (when (and (org-at-heading-p) + (or org-cycle-open-archived-trees + (not (member org-archive-tag (org-get-tags)))) + (or (not arg) + (setq invisible-p (outline-invisible-p (line-end-position))))) + (unless invisible-p + (setq org-cycle-subtree-status 'subtree)) + (org-cycle-internal-local) + t))))) ;;;###autoload (defun +org|remove-occur-highlights ()