From: Dmitry Gutov Date: Mon, 17 Aug 2015 00:56:08 +0000 (+0300) Subject: Allow bitmap width only up to 16 (#49) X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/12def16fbf7fb1a574d4a7d86a213f061f985dbf Allow bitmap width only up to 16 (#49) --- diff --git a/README.md b/README.md index 0f9fe6481..a0d5168a5 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,9 @@ Notes * Frame-local and buffer-local values of `line-spacing` are not supported. +* Fringe width up to 16 works best (because we can't define a bitmap + with width above that number). + * [emacs-git-gutter](https://github.com/syohex/emacs-git-gutter) shows indicators in the margin by default, allows you to customize how the indicators look more easily, and has a "stage hunk" command. diff --git a/diff-hl.el b/diff-hl.el index 17106c11f..5b6510d55 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -140,7 +140,8 @@ (if (floatp spacing) (truncate (* (frame-char-height) spacing)) spacing))) - (w (frame-parameter nil (intern (format "%s-fringe" diff-hl-side)))) + (w (min (frame-parameter nil (intern (format "%s-fringe" diff-hl-side))) + 16)) (middle (make-vector h (expt 2 (1- w)))) (ones (1- (expt 2 w))) (top (copy-sequence middle))