[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff 8f7a212 157/258: Remove with-other-window and s
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff 8f7a212 157/258: Remove with-other-window and sync-line |
Date: |
Wed, 17 May 2017 08:13:42 -0400 (EDT) |
branch: scratch/add-vdiff
commit 8f7a212a66b03983cd0029edf6bf96b54e6e3b45
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Remove with-other-window and sync-line
---
vdiff.el | 38 ++++++++------------------------------
1 file changed, 8 insertions(+), 30 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index 29c604d..dbd0e2e 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -336,19 +336,6 @@ because those are handled differently.")
(1- (overlay-start ovr))
(1+ (overlay-end ovr)))))))
-(defmacro vdiff--with-other-window (&rest body)
- "Execute BODY in other vdiff window."
- `(when (and (vdiff--buffer-p)
- (not vdiff--inhibit-window-switch)
- (vdiff--other-window))
- (setq vdiff--inhibit-window-switch t)
- (save-selected-window
- (unwind-protect
- (progn
- (select-window (vdiff--other-window))
- ,@body)
- (setq vdiff--inhibit-window-switch nil)))))
-
(defmacro vdiff--with-all-buffers (&rest body)
"Execute BODY in all vdiff buffers."
`(dolist (buf vdiff--buffers)
@@ -1191,26 +1178,17 @@ the current one."
(when line
(vdiff--move-to-line line))))
-(defun vdiff--recenter-both ()
- (recenter)
- (vdiff--with-other-window (recenter)))
-
-(defun vdiff--sync-line (line in-a)
- "Sync point in the other vdiff buffer to the line in this
-buffer. This is usually not necessary."
- (interactive (list (line-number-at-pos)
- (not (vdiff--buffer-a-p))))
- (let ((new-line (caar (vdiff--translate-line line))))
- (when new-line
- (vdiff--with-other-window
- (goto-char (vdiff--pos-at-line-beginning new-line))))))
+(defun vdiff--recenter-all ()
+ (dolist (win (vdiff--all-windows))
+ (with-selected-window
+ (recenter))))
(defun vdiff-sync-and-center ()
- "Sync point in the other vdiff buffer to the line in this
-buffer and center both buffers at this line."
+ "Sync point in the other vdiff buffers to the line in this
+buffer and recenter all buffers."
(interactive)
- (vdiff--sync-line (line-number-at-pos) (vdiff--buffer-a-p))
- (vdiff--recenter-both))
+ (vdiff--scroll-function)
+ (vdiff--recenter-all))
(defun vdiff-restore-windows ()
"Restore initial window configuration."
- [elpa] scratch/add-vdiff dc7a5e2 049/258: Add a comment on line-map structure, (continued)
- [elpa] scratch/add-vdiff dc7a5e2 049/258: Add a comment on line-map structure, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff e9d0cc7 050/258: Define new bitmaps for open and close of folds, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1c8dd1e 138/258: Default to nil for auto refinement, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 3d0678f 142/258: Make bitmaps nicer, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 53ee239 149/258: Fix bug in receive changes for 3way, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff e171b7c 140/258: Depend on hydra, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff baed24a 148/258: Work on moving refresh to 3way, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 74ebab6 143/258: Don't move point when closing all folds, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 938cc55 155/258: Fix use of delq (wanted remq), Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 0cbaf6f 156/258: Fix point jumping after receive-changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 8f7a212 157/258: Remove with-other-window and sync-line,
Justin Burkett <=
- [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, 2017/05/17