[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff f77f184 062/258: Fix alignment of folds problem
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff f77f184 062/258: Fix alignment of folds problem caused by recent change |
Date: |
Wed, 17 May 2017 08:13:23 -0400 (EDT) |
branch: scratch/add-vdiff
commit f77f1845c2f9f84d2cb724f6dffa6e4c1a6cb71e
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Fix alignment of folds problem caused by recent change
---
vdiff.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index bc2eab5..336a664 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -479,8 +479,8 @@ text on the first line, and the width of the buffer."
(b-buffer (cadr vdiff--buffers))
(a-line 1)
(b-line 1)
- (a-last-post-end 1)
- (b-last-post-end 1)
+ (a-last-post 1)
+ (b-last-post 1)
folds)
(save-excursion
(with-current-buffer a-buffer
@@ -495,19 +495,21 @@ text on the first line, and the width of the buffer."
(b-range (nth 2 header))
(a-beg (car a-range))
(a-end (cdr a-range))
+ (a-post (if (string= code "a") a-end (1+ a-end)))
(a-len (1+ (- a-end a-beg)))
(b-beg (car b-range))
(b-end (cdr b-range))
+ (b-post (if (string= code "d") b-end (1+ b-end)))
(b-len (1+ (- b-end b-beg))))
(unless (member code (list "a" "d" "c"))
(user-error "vdiff: Unexpected code in diff output"))
- (push (cons (cons a-last-post-end (1- a-beg))
- (cons b-last-post-end (1- b-beg)))
+ (push (cons (cons a-last-post (1- a-beg))
+ (cons b-last-post (1- b-beg)))
folds)
- (setq a-last-post-end (1+ a-end))
- (setq b-last-post-end (1+ b-end))
+ (setq a-last-post a-post)
+ (setq b-last-post b-post)
(let (ovr-a ovr-b)
(with-current-buffer a-buffer
@@ -524,10 +526,10 @@ text on the first line, and the width of the buffer."
(overlay-put ovr-a 'vdiff-other-overlay ovr-b)
(overlay-put ovr-b 'vdiff-other-overlay ovr-a))))
- (push (cons (cons a-last-post-end
+ (push (cons (cons a-last-post
(with-current-buffer a-buffer
(line-number-at-pos (point-max))))
- (cons b-last-post-end
+ (cons b-last-post
(with-current-buffer b-buffer
(line-number-at-pos (point-max)))))
folds)
- [elpa] scratch/add-vdiff 3ef30aa 020/258: Update screenshot, (continued)
- [elpa] scratch/add-vdiff 3ef30aa 020/258: Update screenshot, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff dec9dc5 026/258: Small README change, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 2c113c4 029/258: Merge pull request #1 from syohex/cl-lib, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4312bb1 034/258: Make subtraction overlays zero width, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 305e723 024/258: Add count to next/prev change and simplify, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 12f4a21 042/258: Add quit command, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 72d8dfc 038/258: Avoid making new folds, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff ad37c86 009/258: Factor out subtraction overlay and prefix internal vars, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 04f5436 001/258: Initial commit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff f54616f 039/258: Don't close folds if all are open, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff f77f184 062/258: Fix alignment of folds problem caused by recent change,
Justin Burkett <=
- [elpa] scratch/add-vdiff f2aaa2e 067/258: Fix goto-corresponding-line, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9a748df 065/258: Update README, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9b4e829 069/258: Update requirements for vdiff-hydra, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff d6a399f 076/258: Annouce exit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 43b9dc6 097/258: Add missing image, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 7811f01 095/258: Add two features, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff fa6391e 123/258: Reorg README commands section, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff a2fbb7b 146/258: Rename diff-program-args, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 3d38f6c 040/258: Fix line endings, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 5031c90 145/258: Finish new line translation logic, Justin Burkett, 2017/05/17