branch: scratch/add-vdiff
commit 1b9639001e72d54129346b36c334120d9224bfbd
Author: justbur <[email protected]>
Commit: justbur <[email protected]>
Use fringes for open folds
---
vdiff.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vdiff.el b/vdiff.el
index 85bb07d..adc488c 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -695,7 +695,10 @@ in the region."
(let ((other-fold (overlay-get ovr 'vdiff-other-fold)))
(dolist (ovr1 (list ovr other-fold))
(overlay-put ovr1 'vdiff-fold-open t)
- (overlay-put ovr1 'display nil))))))
+ (overlay-put ovr1 'display nil)
+ (overlay-put ovr1 'line-prefix
+ (propertize " "
+ 'display '(left-fringe vertical-bar))))))))
(defun vdiff-close-fold (beg end)
"Close folds between BEG and END, as well as corresponding ones
@@ -708,6 +711,7 @@ folds in the region."
(let ((other-fold (overlay-get ovr 'vdiff-other-fold)))
(dolist (ovr1 (list ovr other-fold))
(overlay-put ovr1 'vdiff-fold-open nil)
+ (overlay-put ovr1 'line-prefix nil)
(overlay-put ovr1 'display
(overlay-get ovr1 'vdiff-fold-text)))))))