From 2ec01a800f64e53ed3071f38c24b978a02daccc1 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 4 Aug 2009 10:22:08 +0200 Subject: [PATCH] Fix cycling bug. --- lisp/org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 84be9fa1f..0d681c78a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4998,10 +4998,11 @@ in special contexts. (if (org-invisible-p) (org-flag-heading nil))) (setq org-cycle-subtree-status 'children) (run-hook-with-args 'org-cycle-hook 'children)) - ((and (eq last-command this-command) - (or children-skipped + ((or children-skipped + (and (eq last-command this-command) (eq org-cycle-subtree-status 'children))) - ;; We just showed the children, now show everything. + ;; We just showed the children, or no children are there, + ;; now show everything. (run-hook-with-args 'org-pre-cycle-hook 'subtree) (org-show-subtree) (message (if children-skipped "SUBTREE (NO CHILDREN)" "SUBTREE"))