Skip to content

Commit 3eefe68

Browse files
authored
Merge pull request #269 from prashantvithani/master
fix: Handle cons cell value for line-spacing
2 parents e79aa49 + 82693fa commit 3eefe68

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

diff-hl.el

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,13 @@ It can be a relative expression as well, such as \"HEAD^\" with Git, or
315315
(expt text-scale-mode-step text-scale-mode-amount)
316316
1))
317317
(spacing (or (and (display-graphic-p) (default-value 'line-spacing)) 0))
318+
(total-spacing (pcase spacing
319+
((pred numberp) spacing)
320+
(`(,above . ,below) (+ above below))))
318321
(h (+ (ceiling (* (frame-char-height) scale))
319-
(if (floatp spacing)
320-
(truncate (* (frame-char-height) spacing))
321-
spacing)))
322+
(if (floatp total-spacing)
323+
(truncate (* (frame-char-height) total-spacing))
324+
total-spacing)))
322325
(w (min (frame-parameter nil (intern (format "%s-fringe" diff-hl-side)))
323326
diff-hl-bmp-max-width))
324327
(_ (when (zerop w) (setq w diff-hl-bmp-max-width)))

0 commit comments

Comments
 (0)