Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions diff-hl.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down