0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

org-capture: Fix off-by-one error

* lisp/org-capture.el (org-capture-place-table-line): Fix narrowing.
This commit is contained in:
Nicolas Goaziou 2018-10-23 01:32:55 +02:00
parent 7a4a10dea0
commit c76486d4e4

View file

@ -1279,7 +1279,9 @@ may have been stored before."
(point))))
(org-capture-position-for-last-stored 'table-line)
(org-capture-mark-kill-region origin end)
(org-capture-narrow beg end)
;; TEXT is guaranteed to end with a newline character. Ignore
;; it when narrowing so as to not alter data on the next line.
(org-capture-narrow beg (1- end))
(when (or (search-backward "%?" beg t)
(search-forward "%?" end t))
(replace-match "")))