branch: externals/diff-hl
commit 0574c3247ce50cfce6bf9127ac568684be1e2ada
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
diff-hl--update-buffer: Check for liveness
Fixes #259
---
diff-hl.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/diff-hl.el b/diff-hl.el
index 5915ae1823..362611822c 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -645,8 +645,9 @@ contents as they are (or would be) after applying the
changes in NEW."
(diff-hl--update)))
(defun diff-hl--update-buffer (buf)
- (with-current-buffer buf
- (diff-hl-update)))
+ (when (buffer-live-p buf)
+ (with-current-buffer buf
+ (diff-hl-update))))
(defun diff-hl-with-editor-p (_dir)
(bound-and-true-p with-editor-mode))