GNU bug report logs -
#33567
Syntactic fontification of diff hunks
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sat, 1 Dec 2018 22:13:02 UTC
Severity: wishlist
Tags: patch
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #169 received at 33567 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>> There are some underlines on this screenshot, maybe use underlines for
>> refined diffs on tty?
>
> You mean colored underlines for every line? Umm, not sure I'd like that.
Actually I meant underlines instead of inverse-video. Underlined refinement
looks much better than in inverse-video.
Also I propose to not use this feature on tty because there is no good
solution how to combine diff foreground colors with syntax foreground colors:
[diff-mode.tty.patch (text/x-diff, inline)]
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index a4c0618c67..7ab64fa4aa 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -104,7 +104,7 @@ diff-font-lock-prettify
:version "27.1"
:type 'boolean)
-(defcustom diff-font-lock-syntax t
+(defcustom diff-font-lock-syntax (>= (display-color-cells) 88)
"If non-nil, diff hunk font-lock includes source language syntax highlighting.
This highlighting is the same as added by `font-lock-mode'
when corresponding source files are visited normally.
@@ -2019,7 +2019,7 @@ diff-refine-changed
:background "#ffff55")
(((class color) (min-colors 88) (background dark))
:background "#aaaa22")
- (t :inverse-video t))
+ (t :underline t))
"Face used for char-based changes shown by `diff-refine-hunk'.")
(defface diff-refine-removed
This bug report was last modified 6 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.