Check for heading that ends at end of buffer

* org.el (org-narrow-to-subtree): Check for heading that ends at end
of buffer.
This commit is contained in:
David Maus 2010-11-01 19:28:11 +01:00
parent ff9b70d1c1
commit 7bef01a90f
1 changed files with 1 additions and 1 deletions

View File

@ -7501,7 +7501,7 @@ If yes, remember the marker and the distance to BEG."
(narrow-to-region
(progn (org-back-to-heading t) (point))
(progn (org-end-of-subtree t t)
(if (org-on-heading-p) (backward-char 1))
(if (and (org-on-heading-p) (not (eobp))) (backward-char 1))
(point))))))
(eval-when-compile