diff --git a/diff-hl.el b/diff-hl.el index 6f3f1377..9b628a4b 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -315,10 +315,13 @@ It can be a relative expression as well, such as \"HEAD^\" with Git, or (expt text-scale-mode-step text-scale-mode-amount) 1)) (spacing (or (and (display-graphic-p) (default-value 'line-spacing)) 0)) + (total-spacing (pcase spacing + ((pred numberp) spacing) + (`(,above . ,below) (+ above below)))) (h (+ (ceiling (* (frame-char-height) scale)) - (if (floatp spacing) - (truncate (* (frame-char-height) spacing)) - spacing))) + (if (floatp total-spacing) + (truncate (* (frame-char-height) total-spacing)) + total-spacing))) (w (min (frame-parameter nil (intern (format "%s-fringe" diff-hl-side))) diff-hl-bmp-max-width)) (_ (when (zerop w) (setq w diff-hl-bmp-max-width)))