From 67de8d5a46c31b492125f05ceb09ce1a75b57551 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Nov 2015 02:04:50 -0500 Subject: [PATCH] Make diff-hl fringe bitmaps nicer --- core/core-vcs.el | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/core/core-vcs.el b/core/core-vcs.el index ef7059e29..7f391a1d7 100644 --- a/core/core-vcs.el +++ b/core/core-vcs.el @@ -10,8 +10,23 @@ "/git/ignore$")) (use-package diff-hl - :init (setq diff-hl-draw-borders nil) - :config (global-diff-hl-mode +1)) + :init + (setq diff-hl-draw-borders nil + diff-hl-fringe-bmp-function 'narf-diff-hl-fringe-bmp) + :config + (defun narf-diff-hl-fringe-bmp (type _pos) + (if (eq type 'delete) + 'narf--diff-hl-bitmap-del + 'narf--diff-hl-bitmap)) + + (define-fringe-bitmap 'narf--diff-hl-bitmap + [240 240 240 240 240 240 240 240 240 240 240 240 240 240] + nil nil 'center) + (define-fringe-bitmap 'narf--diff-hl-bitmap-del + [248 240 224 192 128 0 0 0 0 0 0 0 0 0] + nil nil 'center) + + (global-diff-hl-mode 1)) (use-package github-browse-file :commands (narf:github-browse-file github-browse-file github-browse-file-blame)