[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff b840935 202/258: Use more specific faces for re
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff b840935 202/258: Use more specific faces for refinements |
Date: |
Wed, 17 May 2017 08:13:51 -0400 (EDT) |
branch: scratch/add-vdiff
commit b84093517aaa7988c8ef7248bb9aaf7ecd7d0a22
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Use more specific faces for refinements
* Distinguish between refining additions and changes.
* Inherit from diff-refine-added and diff-refine-changed
---
vdiff.el | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index f2b57f1..1ca4de3 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -170,9 +170,14 @@ indicate the subtraction location in the fringe."
"Face for subtraction fringe indicators"
:group 'vdiff)
-(defface vdiff-word-changed-face
- '((t :inherit highlight))
- "Face for word changes within a hunk"
+(defface vdiff-refine-changed
+ '((t :inherit diff-refine-changed))
+ "Face for word changes within a change hunk"
+ :group 'vdiff)
+
+(defface vdiff-refine-added
+ '((t :inherit diff-refine-added))
+ "Face for word changes within an addition hunk"
:group 'vdiff)
(defface vdiff-target-face
@@ -693,6 +698,10 @@ SYNTAX-CODE."
(word-syn (or syntax-code
vdiff-default-refinement-syntax-code))
(not-word-syn (concat "^" word-syn))
+ (type (overlay-get ovr 'vdiff-type))
+ (face (if (eq type 'addition)
+ 'vdiff-refine-added
+ 'vdiff-refine-changed))
instructions ovr-ins)
(when (and ovr
target-ovr
@@ -723,7 +732,7 @@ SYNTAX-CODE."
(point)))))
(cl-incf current-word-n (length words))
(overlay-put word-ovr 'vdiff t)
- (overlay-put word-ovr 'face 'vdiff-word-changed-face)
+ (overlay-put word-ovr 'face face)
(overlay-put word-ovr 'vdiff-refinement t)
(skip-syntax-forward not-word-syn))))))))))
- [elpa] scratch/add-vdiff 8f7a212 157/258: Remove with-other-window and sync-line, (continued)
- [elpa] scratch/add-vdiff 8f7a212 157/258: Remove with-other-window and sync-line, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c2627f0 160/258: Fix recenter-all, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 78071df 147/258: Use a separate minor-mode for 3way, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff a373c6b 139/258: Fix line endings in README, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 7bc7f40 172/258: Add recent changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 8842469 184/258: Allow point to leave overlay on target selection, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b4c3e09 195/258: Ensure sentinel runs in correct context, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 28c939f 194/258: Document new option, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 133e187 193/258: Allow folds to close on point but make optional, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4dd194b 190/258: Update screenshot with refinements, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b840935 202/258: Use more specific faces for refinements,
Justin Burkett <=
- [elpa] scratch/add-vdiff f4332f2 212/258: Fix typo in Commentary section, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1549115 005/258: Add option to lock scrolling by default, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 0f640d3 007/258: Add header info, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 72c20a5 010/258: Add gitignore, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 016518f 016/258: Fix folds at end of buffer, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 10b7760 018/258: Add faces, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 952440e 002/258: Initial commit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 245850f 028/258: Load cl-lib for using its function, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 988c476 027/258: Add new defcustoms to README, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b77efe3 008/258: Add README and improve docstrings, Justin Burkett, 2017/05/17