emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 12def16 14/42: Allow bitmap width only up to 16 (#49)


From: Dmitry Gutov
Subject: [elpa] master 12def16 14/42: Allow bitmap width only up to 16 (#49)
Date: Wed, 09 Sep 2015 19:03:32 +0000

branch: master
commit 12def16fbf7fb1a574d4a7d86a213f061f985dbf
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]