org-tree-to-indirect-buffer: Fix when last headline is empty at point-max
* lisp/org.el (org-tree-to-indirect-buffer): Consider scenario when `org-end-of-subtree' with 't second arg moves to `point-max' at the end of an empty headline. We do not need to move back the point then. Fixes https://orgmode.org/list/CA+AFVDUF3RzA-mnoAp8yFv-bppoYJfJo=Wa8qmNQhV-tfHHB+w@mail.gmail.com
This commit is contained in:
parent
9ca3bc3730
commit
7ec9e37117
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue