[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 76289d2 4/8: Add and use diff-hl-maybe-redefine-bitmaps
From: |
Dmitry Gutov |
Subject: |
[elpa] master 76289d2 4/8: Add and use diff-hl-maybe-redefine-bitmaps |
Date: |
Sat, 23 Feb 2019 18:35:44 -0500 (EST) |
branch: master
commit 76289d24c61fac501d955a8419b5fdf7debddd5f
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Add and use diff-hl-maybe-redefine-bitmaps
Fixes #121
---
diff-hl.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/diff-hl.el b/diff-hl.el
index 5ef4f88..5333789 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -187,6 +187,10 @@ the end position as its only argument."
(diff-hl-define-bitmaps)
(define-fringe-bitmap 'diff-hl-bmp-empty [0] 1 1 'center))))
+(defun diff-hl-maybe-redefine-bitmaps ()
+ (when (window-system)
+ (diff-hl-define-bitmaps)))
+
(defvar diff-hl-spec-cache (make-hash-table :test 'equal))
(defun diff-hl-fringe-spec (type pos side)
@@ -534,7 +538,7 @@ The value of this variable is a mode line template as in
;; instead, but only when they dosn't call `revert-buffer':
(add-hook 'magit-not-reverted-hook 'diff-hl-update nil t)
(add-hook 'auto-revert-mode-hook 'diff-hl-update nil t)
- (add-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps nil t))
+ (add-hook 'text-scale-mode-hook 'diff-hl-maybe-redefine-bitmaps nil t))
(remove-hook 'after-save-hook 'diff-hl-update t)
(remove-hook 'after-change-functions 'diff-hl-edit t)
(remove-hook 'find-file-hook 'diff-hl-update t)
@@ -543,7 +547,7 @@ The value of this variable is a mode line template as in
(remove-hook 'magit-revert-buffer-hook 'diff-hl-update t)
(remove-hook 'magit-not-reverted-hook 'diff-hl-update t)
(remove-hook 'auto-revert-mode-hook 'diff-hl-update t)
- (remove-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps t)
+ (remove-hook 'text-scale-mode-hook 'diff-hl-maybe-redefine-bitmaps t)
(diff-hl-remove-overlays)))
(when (require 'smartrep nil t)
- [elpa] master updated (5249e54 -> 08c36be), Dmitry Gutov, 2019/02/23
- [elpa] master 2cddce4 3/8: Fix the breakage, Dmitry Gutov, 2019/02/23
- [elpa] master 7144c1c 1/8: diff-hl-flydiff: Set tick to nil and use buffer-chars-modified-tick, Dmitry Gutov, 2019/02/23
- [elpa] master 9ddb7da 5/8: Add the Usage section, Dmitry Gutov, 2019/02/23
- [elpa] master 76289d2 4/8: Add and use diff-hl-maybe-redefine-bitmaps,
Dmitry Gutov <=
- [elpa] master 84a5fe1 7/8: Bump the version, Dmitry Gutov, 2019/02/23
- [elpa] master 08c36be 8/8: Merge commit '84a5fe1900af2e5cc522f02749804f0d9f094bbf' from diff-hl, Dmitry Gutov, 2019/02/23
- [elpa] master d3f90cc 6/8: Change psvn integration example to use nadvice, Dmitry Gutov, 2019/02/23
- [elpa] master b47cfe1 2/8: Update copyright, Dmitry Gutov, 2019/02/23