emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/diff-hl 2cf8b48 07/25: Avoid the "args out of range err


From: Dmitry Gutov
Subject: [elpa] externals/diff-hl 2cf8b48 07/25: Avoid the "args out of range error"
Date: Sun, 20 Dec 2020 05:07:00 -0500 (EST)

branch: externals/diff-hl
commit 2cf8b489f3b71c869a5626a5eb41f36495bdfd61
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Avoid the "args out of range error"
    
    If the fringe is hidden, etc, the bitmap width isn't important anyway.
    
    Fixes #135
---
 diff-hl.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/diff-hl.el b/diff-hl.el
index e78ae10..9cfb2e5 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -151,6 +151,7 @@ the end position as its only argument."
                  spacing)))
          (w (min (frame-parameter nil (intern (format "%s-fringe" 
diff-hl-side)))
                  16))
+         (_ (when (zerop w) (setq w 16)))
          (middle (make-vector h (expt 2 (1- w))))
          (ones (1- (expt 2 w)))
          (top (copy-sequence middle))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]