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

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

[elpa] master 8dd7d96 12/22: Don't error out when fringe is disabled


From: Dmitry Gutov
Subject: [elpa] master 8dd7d96 12/22: Don't error out when fringe is disabled
Date: Fri, 02 Jan 2015 23:46:30 +0000

branch: master
commit 8dd7d96e4b2c33f5c9fcd45181b55175b16258a8
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Don't error out when fringe is disabled
    
    Fixes #20 (belatedly) and purcell/emacs.d#241
---
 diff-hl.el |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/diff-hl.el b/diff-hl.el
index 8f675a3..1daab19 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -144,6 +144,9 @@
     (define-fringe-bitmap 'diff-hl-bmp-bottom bottom h w 'bottom)
     (define-fringe-bitmap 'diff-hl-bmp-single single h w 'top)
     (let* ((w2 (* (/ w 2) 2))
+           ;; When fringes are disabled, it's easier to fix up the width,
+           ;; instead of doing nothing (#20).
+           (w2 (if (zerop w2) 2 w2))
            (delete-row (- (expt 2 (1- w2)) 2))
            (middle-pos (1- (/ w2 2)))
            (middle-bit (expt 2 middle-pos))



reply via email to

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