summaryrefslogtreecommitdiff
path: root/lisp/org/org.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org.el')
-rw-r--r--lisp/org/org.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 253a9efa27c..bddc319bf6a 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -6905,7 +6905,7 @@ frame is not changed."
(setq beg (point)
heading (org-get-heading 'no-tags))
(org-end-of-subtree t t)
- (when (org-at-heading-p) (backward-char 1))
+ (when (and (not (eobp)) (org-at-heading-p)) (backward-char 1))
(setq end (point)))
(when (and (buffer-live-p org-last-indirect-buffer)
(not (eq org-indirect-buffer-display 'new-frame))