branch: scratch/add-vdiff
commit b26788557497c9fc428aaa1a3390d64a380a26f2
Merge: c6e30a2 371febc
Author: justbur <[email protected]>
Commit: justbur <[email protected]>
Merge branch 'gvol-master'
---
vdiff.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/vdiff.el b/vdiff.el
index dd96296..11e8db2 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -104,6 +104,11 @@
https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Class-Table.htm
:group 'vdiff
:type 'string)
+(defcustom vdiff-auto-refine t
+ "If non-nil, automatically refine all hunks."
+ :group 'vdiff
+ :type 'bool)
+
(defcustom vdiff-subtraction-style 'full
"How to represent subtractions (i.e., deleted lines). The
default is full which means add the same number of (fake) lines
@@ -390,7 +395,9 @@ parsing the diff output and triggering the overlay updates."
(vdiff--refresh-overlays)
(vdiff--refresh-line-maps)
(delete-file (process-get proc 'vdiff-tmp-a))
- (delete-file (process-get proc 'vdiff-tmp-b))))
+ (delete-file (process-get proc 'vdiff-tmp-b))
+ (when vdiff-auto-refine
+ (vdiff-refine-all-hunks))))
(setq vdiff--diff-stale nil)))
(defun vdiff--remove-all-overlays ()