Переглянути джерело

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.
Bastien 5 роки тому
батько
коміт
c2aebcee27
1 змінених файлів з 5 додано та 7 видалено
  1. 5 7
      lisp/org.el

+ 5 - 7
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'.