branch: master
commit 12def16fbf7fb1a574d4a7d86a213f061f985dbf
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Allow bitmap width only up to 16 (#49)
---
README.md | 3 +++
diff-hl.el | 3 ++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/README.md b/README.md
index 0f9fe64..a0d5168 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 17106c1..5b6510d 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))