forked from mirrors/org-mode
org.el: Fix bug about visibility cycling
* lisp/org.el (org-cycle-internal-local): When cycling visibility on a subtree, don't take a list has a child. These two subtrees should cycle the same way: * A subtree A Paragraph. * A subtree - A list. Before the fix, the second subtree would cycle through three steps instead of two. Thanks to Samuel Wales for reporting this.
This commit is contained in:
parent
6d0b866637
commit
c2aebcee27
12
lisp/org.el
12
lisp/org.el
|
@ -6403,13 +6403,11 @@ Use `\\[org-edit-special]' to edit table.el tables"))
|
|||
(setq eos (save-excursion (org-end-of-subtree t t)
|
||||
(when (bolp) (backward-char)) (point)))
|
||||
(setq has-children
|
||||
(or (save-excursion
|
||||
(let ((level (funcall outline-level)))
|
||||
(outline-next-heading)
|
||||
(and (org-at-heading-p t)
|
||||
(> (funcall outline-level) level))))
|
||||
(save-excursion
|
||||
(org-list-search-forward (org-item-beginning-re) eos t)))))
|
||||
(save-excursion
|
||||
(let ((level (funcall outline-level)))
|
||||
(outline-next-heading)
|
||||
(and (org-at-heading-p t)
|
||||
(> (funcall outline-level) level))))))
|
||||
;; Determine end invisible part of buffer (EOL)
|
||||
(beginning-of-line 2)
|
||||
(while (and (not (eobp)) ;This is like `next-line'.
|
||||
|
|
Loading…
Reference in a new issue