[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff 1549115 005/258: Add option to lock scrolling b
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff 1549115 005/258: Add option to lock scrolling by default |
Date: |
Wed, 17 May 2017 08:13:11 -0400 (EDT) |
branch: scratch/add-vdiff
commit 1549115d034389ae56027df1f8f2478183a15475
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Add option to lock scrolling by default
---
vdiff.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index 063b4c4..4d74544 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1,3 +1,7 @@
+(defcustom vdiff-lock-scrolling t
+ "Whether to lock scrolling by default when starting
+ `vdiff-mode'.")
+
(defcustom vdiff-diff-program "diff"
"diff program to use.")
@@ -529,11 +533,15 @@ lines in sync.")
(if vdiff-mode
(progn
(setq cursor-in-non-selected-windows nil)
- (add-hook 'after-save-hook #'vdiff-refresh nil t))
+ (add-hook 'after-save-hook #'vdiff-refresh nil t)
+ (when vdiff-lock-scrolling
+ (vdiff-scroll-lock-mode 1)))
(setq cursor-in-non-selected-windows t)
(setq vdiff-diff-data nil)
(vdiff-remove-all-overlays)
- (remove-hook 'after-save-hook #'vdiff-refresh t)))
+ (remove-hook 'after-save-hook #'vdiff-refresh t)
+ (when vdiff-scroll-lock-mode
+ (vdiff-scroll-lock-mode -1))))
(define-minor-mode vdiff-scroll-lock-mode
" "
- [elpa] scratch/add-vdiff 78071df 147/258: Use a separate minor-mode for 3way, (continued)
- [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
- [elpa] scratch/add-vdiff f4332f2 212/258: Fix typo in Commentary section, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1549115 005/258: Add option to lock scrolling by default,
Justin Burkett <=
- [elpa] scratch/add-vdiff 0f640d3 007/258: Add header info, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 72c20a5 010/258: Add gitignore, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 016518f 016/258: Fix folds at end of buffer, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 10b7760 018/258: Add faces, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 952440e 002/258: Initial commit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 245850f 028/258: Load cl-lib for using its function, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 988c476 027/258: Add new defcustoms to README, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b77efe3 008/258: Add README and improve docstrings, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff ce10994 003/258: Introduce defcustoms and use lists instead of .., Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff ad6035d 015/258: Implement folding of unchanged lines, Justin Burkett, 2017/05/17