[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff af5ddce 203/258: Remove vdiff-sync-and-center
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff af5ddce 203/258: Remove vdiff-sync-and-center |
Date: |
Wed, 17 May 2017 08:13:51 -0400 (EDT) |
branch: scratch/add-vdiff
commit af5ddce08f9d98578a94245ed50ef41e5996a99f
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Remove vdiff-sync-and-center
recenter serves this purpose fine now, since the scroll function picks
up any scrolling changes properly.
---
README.org | 5 ++---
vdiff.el | 35 ++++++++---------------------------
2 files changed, 10 insertions(+), 30 deletions(-)
diff --git a/README.org b/README.org
index 6768c2a..9b887bf 100644
--- a/README.org
+++ b/README.org
@@ -22,8 +22,8 @@ buffer to the other. The main features are
vdiff has not been extensively tested yet, so please report any issues you
find. Contributions and suggestions are very welcome.
-** Recent Changes
- - [2016-07-25] Added three-way diff support. See =vdiff-buffers3= and
=vdiff-files3=.
+** Recent (Significant) Changes
+ - [2016-07-25] Added three-way diff support. See =vdiff-buffers3= and
=vdiff-files3=.
** Screenshot
@@ -58,7 +58,6 @@ the commands would be
| =C-c n= | =vdiff-next-hunk= | Move to next hunk in buffer |
| =C-c p= | =vdiff-previous-hunk= | Move to previous hunk in buffer |
| =C-c h= | =vdiff-hydra/body= | Enter vdiff-hydra |
-| =C-l= | =vdiff-sync-and-center= | Recenter both buffers at this line |
*** Viewing and Transmitting Changes Between Buffers
diff --git a/vdiff.el b/vdiff.el
index 1ca4de3..58ca0b9 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1325,18 +1325,6 @@ the current one."
(when line
(vdiff--move-to-line line))))
-(defun vdiff--recenter-all ()
- (dolist (win (vdiff--all-windows))
- (with-selected-window win
- (recenter))))
-
-(defun vdiff-sync-and-center ()
- "Sync point in another vdiff buffers to the line in this
-buffer and recenter all buffers."
- (interactive)
- (vdiff--scroll-function)
- (vdiff--recenter-all))
-
(defun vdiff-restore-windows ()
"Restore initial window configuration."
(interactive)
@@ -1560,28 +1548,28 @@ with non-nil USE-FOLDS."
(interactive "p")
(let ((count (or arg 1)))
(goto-char (vdiff--nth-hunk count))
- (vdiff-sync-and-center)))
+ (recenter)))
(defun vdiff-previous-hunk (arg)
"Jump to previous change in this buffer."
(interactive "p")
(let ((count (or (- arg) -1)))
(goto-char (vdiff--nth-hunk count))
- (vdiff-sync-and-center)))
+ (recenter)))
(defun vdiff-next-fold (arg)
"Jump to next fold in this buffer."
(interactive "p")
(let ((count (or arg 1)))
(goto-char (vdiff--nth-hunk count t))
- (vdiff-sync-and-center)))
+ (recenter)))
(defun vdiff-previous-fold (arg)
"Jump to previous fold in this buffer."
(interactive "p")
(let ((count (or (- arg) -1)))
(goto-char (vdiff--nth-hunk count t))
- (vdiff-sync-and-center)))
+ (recenter)))
;; * Session
@@ -1669,7 +1657,7 @@ function for ON-QUIT to do something useful with the
result."
(vdiff-mode -1)
(vdiff-3way-mode -1)
(vdiff-mode 1)))
- (vdiff-refresh #'vdiff-sync-and-center)))
+ (vdiff-refresh #'vdiff--scroll-function)))
(defcustom vdiff-3way-layout-function 'vdiff-3way-layout-function-default
"Function to layout windows in 3way diffs"
@@ -1725,7 +1713,7 @@ function for ON-QUIT to do something useful with the
result."
(vdiff-mode -1)
(vdiff-3way-mode -1)
(vdiff-3way-mode 1)))
- (vdiff-refresh #'vdiff-sync-and-center)))
+ (vdiff-refresh #'vdiff--scroll-function)))
;;;###autoload
(defun vdiff-files3 (file-a file-b file-c &optional on-quit)
@@ -1782,16 +1770,9 @@ you will be asked to select two files."
(setq vdiff--session nil)
(message "vdiff exited")))
-(defvar vdiff-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-l" 'vdiff-sync-and-center)
- map))
+(defvar vdiff-mode-map (make-sparse-keymap))
-(defvar vdiff-3way-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map vdiff-mode-map)
- (define-key map "\C-l" 'vdiff-sync-and-center)
- map))
+(defvar vdiff-3way-mode-map (make-sparse-keymap))
(defvar vdiff-mode-prefix-map
(let ((map (make-sparse-keymap)))
- [elpa] scratch/add-vdiff 7811f01 095/258: Add two features, (continued)
- [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
- [elpa] scratch/add-vdiff 8c78e58 170/258: Fix compiler warning, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9890b81 181/258: Fix weird vscroll problem, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9454053 187/258: Use window-text-width instead of window-width, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff e6e834f 196/258: Don't refresh on buffer switch, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 5043ca3 168/258: Wrap global state into session object, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff af5ddce 203/258: Remove vdiff-sync-and-center,
Justin Burkett <=
- [elpa] scratch/add-vdiff 7f100a3 210/258: Fix vdiff-refresh callback function, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1478a02 219/258: vdiff-magit: Make group, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 90374e7 223/258: vdiff-magit: Port dwim-show-on-hunks, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 219d765 225/258: vdiff-magit: Simplify stage, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 05cbdee 227/258: vdiff: Allow buffers to be killed in quit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 98e1add 216/258: vdiff-magit: Port show-staged, show-unstaged and stage, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff e5d3633 226/258: Revert "vdiff-magit: Simplify stage", Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff de84cfd 232/258: vdiff-magit: Fix a function reference in dwim, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 7a3e456 234/258: vdiff-magit: Cleanup after stage, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 52d49ba 214/258: Merge branch 'magit' into magit2, Justin Burkett, 2017/05/17