org.el (org-cycle-internal-local): Fix bug: allow headings with leading blank characters

* org.el (org-cycle-internal-local): Fix bug: allow headings
with leading blank characters.

Thanks to Rémi Vanicat for sending a patch for this.
This commit is contained in:
Bastien Guerry 2012-12-28 12:41:07 +01:00
parent 5c4d3cbcbf
commit ffcd23cf30

View file

@ -6259,11 +6259,7 @@ in special contexts.
(setq has-children (org-list-has-child-p (point) struct)))
(org-back-to-heading)
(setq eoh (save-excursion (outline-end-of-heading) (point)))
(setq eos (save-excursion
(org-end-of-subtree t)
(unless (eobp)
(skip-chars-forward " \t\n"))
(if (eobp) (point) (1- (point)))))
(setq eos (save-excursion (1- (org-end-of-subtree t t))))
(setq has-children
(or (save-excursion
(let ((level (funcall outline-level)))