[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff 4d5299e 031/258: Fix alignment of folds next to
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff 4d5299e 031/258: Fix alignment of folds next to subtractions |
Date: |
Wed, 17 May 2017 08:13:17 -0400 (EDT) |
branch: scratch/add-vdiff
commit 4d5299e9287e0d05e5297fce73f886b76c33f539
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Fix alignment of folds next to subtractions
---
vdiff.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index 2f55b2a..509cb7d 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -332,9 +332,7 @@ lines hidden."
(defun vdiff--add-subtraction-overlays (buffer start-line target-range amount)
(with-current-buffer buffer
(vdiff--move-to-line start-line)
- (end-of-line)
- (let* ((position (1+ (point)))
- (ovr (make-overlay position (1+ position))))
+ (let* ((ovr (make-overlay (point) (1+ (point)))))
(overlay-put ovr 'before-string
(vdiff--make-subtraction-string amount))
(overlay-put ovr 'vdiff-target-range target-range)
@@ -436,6 +434,12 @@ lines hidden."
(b-norm-range (cons b-beg b-end))
(b-length (1+ (- b-end b-beg))))
+ ;; Adjust line number for subtractions
+ (when (string= code "a")
+ (cl-incf a-beg))
+ (when (string= code "d")
+ (cl-incf b-beg))
+
(vdiff--add-folds
a-buffer b-buffer
(cons a-last-post-end (1- a-beg))
- [elpa] branch scratch/add-vdiff created (now 819ea4b), Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b6b37a5 022/258: Broaden search for overlays at point, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4b7f3d1 004/258: Make buffer names easier to read in functions, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1155601 014/258: Fix problem with restarting mode and temp files, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1b96390 021/258: Use fringes for open folds, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 8a51468 025/258: Don't close fold on point on refresh, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4d5299e 031/258: Fix alignment of folds next to subtractions,
Justin Burkett <=
- [elpa] scratch/add-vdiff f826315 033/258: Increase default fold padding, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 3e1169c 043/258: Screenshot showing off theme integration, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff a094450 048/258: Tweak line translation rules for better scrolling, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 0fd1837 063/258: Update screenshot, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b02b59e 072/258: Whitespace cleanup, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b2ba7ab 070/258: Move hydra to main file and avoid dependency, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff bfdfc74 053/258: Modify gitignore, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff d25fe21 054/258: More arg name changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 875e6ce 057/258: Merge pull request #2 from purcell/patch-1, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1640078 061/258: Merge remote-tracking branch 'origin/master', Justin Burkett, 2017/05/17