diff options
author | Bastien <bzg@gnu.org> | 2020-01-29 21:39:52 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-01-29 21:39:52 +0100 |
commit | c2aebcee273b23185bb0263013e2ea9f683b6032 (patch) | |
tree | ceeb039acc50dc22d4c44a85c24ccef1659d022c | |
parent | 6d0b86663718f359f8b12431e63424d454b37ea1 (diff) | |
download | org-mode-c2aebcee273b23185bb0263013e2ea9f683b6032.tar.gz |
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.
-rw-r--r-- | lisp/org.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el index 00d93d6..768216c 100644 --- a/lisp/org.el +++ b/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'. |