fix(org): out-of-bounds refreshing inline images

A regression caused by 6934014, due to
org-babel-where-is-src-block-result returning a position after
org-babel-result-end.

Fix: #6046
Amend: 69340149f9
This commit is contained in:
Henrik Lissner 2022-01-27 14:33:31 +01:00
parent ff4609835a
commit 451be94fb8

View file

@ -314,10 +314,9 @@ Also adds support for a `:sync' parameter to override `:async'."
;; ...and not while tangling org buffers (which happens in a temp ;; ...and not while tangling org buffers (which happens in a temp
;; buffer where `buffer-file-name' is nil). ;; buffer where `buffer-file-name' is nil).
(string-match-p "^ \\*temp" (buffer-name))) (string-match-p "^ \\*temp" (buffer-name)))
(org-display-inline-images (let ((beg (org-babel-where-is-src-block-result))
nil nil (end (org-babel-result-end)))
(org-babel-where-is-src-block-result) (org-display-inline-images nil nil (min beg end) (max beg end))))))
(org-babel-result-end)))))
(after! python (after! python
(unless org-babel-python-command (unless org-babel-python-command