mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-29 07:58:21 +00:00
org-capture.el: Fix wrong narrowing with :prepend set to `t'
* org-capture.el (org-capture-finalize): Ensure to widen the buffer when the target buffer is not initially narrowed. Thanks to Adam Spiers and Thomas Proschinger for reporting this bug.
This commit is contained in:
parent
a6f8460487
commit
a6bac51c5b
@ -741,7 +741,8 @@ captured item after finalizing."
|
||||
(pos (org-capture-get :initial-target-position))
|
||||
(ipt (org-capture-get :insertion-point))
|
||||
(size (org-capture-get :captured-entry-size)))
|
||||
(when reg
|
||||
(if (not reg)
|
||||
(widen)
|
||||
(cond ((< ipt (car reg))
|
||||
;; insertion point is before the narrowed region
|
||||
(narrow-to-region (+ size (car reg)) (+ size (cdr reg))))
|
||||
|
Loading…
Reference in New Issue
Block a user