Browse Source

org-cycle: Cycle visibility when point is at the end of a folded headline

* lisp/org.el: (org-cycle): Ignore invisible newlines and cycle
  visibility when point is visibly on a headline.

Requested by: Nikolaus Rath <Nikolaus@rath.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/97125>
Charles Berry 10 years ago
parent
commit
c1f515840d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -6781,7 +6781,7 @@ in special contexts.
 
 
        ;; At an item/headline: delegate to `org-cycle-internal-local'.
        ;; At an item/headline: delegate to `org-cycle-internal-local'.
        ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
        ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
-		 (save-excursion (beginning-of-line 1)
+		 (save-excursion (move-beginning-of-line 1)
 				 (looking-at org-outline-regexp)))
 				 (looking-at org-outline-regexp)))
 	     (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
 	     (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
 	(org-cycle-internal-local))
 	(org-cycle-internal-local))