branch: elpa/dirvish commit 3c41c40875e3eea98d7d2a647d4a0ef920f4f939 Author: Alex Lu <hellosimon1...@hotmail.com> Commit: Alex Lu <hellosimon1...@hotmail.com>
fix: `ansi-color-apply-on-region` requires writeable buffer --- dirvish.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dirvish.el b/dirvish.el index 66b5832309..1b6d9156e3 100644 --- a/dirvish.el +++ b/dirvish.el @@ -740,8 +740,10 @@ buffer, it defaults to filename under the cursor when it is nil." (defun dirvish-apply-ansicolor-h (_win pos) "Update dirvish ansicolor in preview window from POS." - (ansi-color-apply-on-region - (goto-char pos) (progn (forward-line (frame-height)) (point)))) + (let (buffer-read-only) + (ansi-color-apply-on-region + (goto-char pos) (progn (forward-line (frame-height)) (point))))) + (defun dirvish-update-body-h () "Update UI of Dirvish."