branch: externals/diff-hl
commit 24ffee91ba88606fd2d76941f20807c6be2c366a
Author: Ta Quang Trung <taquangtr...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

    Make the maximum width of the fringe indicators customizable (#233)
---
 diff-hl.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/diff-hl.el b/diff-hl.el
index 5a2a5df215..474020a23d 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -147,6 +147,10 @@
            (set-default var value)
            (when on (global-diff-hl-mode 1)))))
 
+(defcustom diff-hl-bmp-max-width 16
+  "Maximum width in pixels of the bitmap indicators."
+  :type 'integer)
+
 (defcustom diff-hl-highlight-revert-hunk-function
   #'diff-hl-revert-narrow-to-hunk
   "Function to emphasize the current hunk in `diff-hl-revert-hunk'.
@@ -230,8 +234,8 @@ It can be a relative expression as well, such as \"HEAD^\" 
with Git, or
                    (truncate (* (frame-char-height) spacing))
                  spacing)))
          (w (min (frame-parameter nil (intern (format "%s-fringe" 
diff-hl-side)))
-                 16))
-         (_ (when (zerop w) (setq w 16)))
+                 diff-hl-bmp-max-width))
+         (_ (when (zerop w) (setq w diff-hl-bmp-max-width)))
          (middle (make-vector h (expt 2 (1- w))))
          (ones (1- (expt 2 w)))
          (top (copy-sequence middle))

Reply via email to