From: Dmitry Gutov Date: Fri, 12 Dec 2014 18:38:49 +0000 (+0200) Subject: Don't error out when fringe is disabled X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/8dd7d96e4b2c33f5c9fcd45181b55175b16258a8 Don't error out when fringe is disabled Fixes #20 (belatedly) and purcell/emacs.d#241 --- diff --git a/diff-hl.el b/diff-hl.el index 8f675a322..1daab1913 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))