Fix subsequent previews
image-mode marks buffer parts as read-only, essentially disallowing (erase-buffer).
This commit is contained in:
parent
2134815c6c
commit
40af3bde4f
|
@ -483,10 +483,10 @@ Put the result into buffer BUF, selecting the window according to PREFIX:
|
|||
(defun plantuml-preview-string (prefix string)
|
||||
"Preview diagram from PlantUML sources (as STRING), using prefix (as PREFIX)
|
||||
to choose where to display it."
|
||||
(let ((b (get-buffer plantuml-preview-buffer)))
|
||||
(when b
|
||||
(with-current-buffer b
|
||||
(erase-buffer))))
|
||||
(when-let ((b (get-buffer plantuml-preview-buffer))
|
||||
(inhibit-read-only t))
|
||||
(with-current-buffer b
|
||||
(erase-buffer)))
|
||||
|
||||
(let* ((imagep (and (display-images-p)
|
||||
(plantuml-is-image-output-p)))
|
||||
|
|
Loading…
Reference in New Issue