[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree d0273ec 144/195: Make undo-tree-visualizer-[u
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree d0273ec 144/195: Make undo-tree-visualizer-[undo|redo]-to-x work in selection mode. |
Date: |
Sat, 28 Nov 2020 13:41:40 -0500 (EST) |
branch: externals/undo-tree
commit d0273ec03803eba1702f4dd3a076016b790662c2
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Make undo-tree-visualizer-[undo|redo]-to-x work in selection mode.
---
undo-tree.el | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index f45944e..769f0b0 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -3933,13 +3933,20 @@ specifies `saved', and a negative prefix argument
specifies
((< x 0) 'register)
((<= x 4) 'branch)
(t 'saved))))
- (let ((current (undo-tree-current buffer-undo-tree))
+ (let ((current (if undo-tree-visualizer-selection-mode
+ undo-tree-visualizer-selected-node
+ (undo-tree-current buffer-undo-tree)))
(diff undo-tree-visualizer-diff)
r)
(undo-tree-visualizer-hide-diff)
(while (and (undo-tree-node-previous current)
- (or (undo-tree-visualize-undo) t)
- (setq current (undo-tree-current buffer-undo-tree))
+ (or (if undo-tree-visualizer-selection-mode
+ (progn
+ (undo-tree-visualizer-select-previous)
+ (setq current undo-tree-visualizer-selected-node))
+ (undo-tree-visualize-undo)
+ (setq current (undo-tree-current buffer-undo-tree)))
+ t)
;; branch point
(not (or (and (or (null x) (eq x 'branch))
(> (undo-tree-num-branches) 1))
@@ -3974,13 +3981,20 @@ specifies `saved', and a negative prefix argument
specifies
((< x 0) 'register)
((<= x 4) 'branch)
(t 'saved))))
- (let ((current (undo-tree-current buffer-undo-tree))
+ (let ((current (if undo-tree-visualizer-selection-mode
+ undo-tree-visualizer-selected-node
+ (undo-tree-current buffer-undo-tree)))
(diff undo-tree-visualizer-diff)
r)
(undo-tree-visualizer-hide-diff)
(while (and (undo-tree-node-next current)
- (or (undo-tree-visualize-redo) t)
- (setq current (undo-tree-current buffer-undo-tree))
+ (or (if undo-tree-visualizer-selection-mode
+ (progn
+ (undo-tree-visualizer-select-next)
+ (setq current undo-tree-visualizer-selected-node))
+ (undo-tree-visualize-redo)
+ (setq current (undo-tree-current buffer-undo-tree)))
+ t)
;; branch point
(not (or (and (or (null x) (eq x 'branch))
(> (undo-tree-num-branches) 1))
@@ -4088,7 +4102,7 @@ specifies `saved', and a negative prefix argument
specifies
(interactive "p")
(let ((node undo-tree-visualizer-selected-node))
(catch 'top
- (dotimes (i arg)
+ (dotimes (i (or arg 1))
(unless (undo-tree-node-previous node) (throw 'top t))
(setq node (undo-tree-node-previous node))))
;; when using lazy drawing, extend tree upwards as required
@@ -4108,7 +4122,7 @@ specifies `saved', and a negative prefix argument
specifies
(interactive "p")
(let ((node undo-tree-visualizer-selected-node))
(catch 'bottom
- (dotimes (i arg)
+ (dotimes (i (or arg 1))
(unless (nth (undo-tree-node-branch node) (undo-tree-node-next node))
(throw 'bottom t))
(setq node
- [elpa] externals/undo-tree 443d74c 111/195: Avoid triggering error when saving undo history when there's nothing to save., (continued)
- [elpa] externals/undo-tree 443d74c 111/195: Avoid triggering error when saving undo history when there's nothing to save., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5d06288 130/195: Implement lazy undo-tree drawing in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4c14173 115/195: Fix undo history auto-saving., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e352286 131/195: Fix incompatiblity with newer high-resolution timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 0ba9a0f 134/195: Bump version number., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 17d2dee 141/195: Switch order of diff comparision in diff display., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree ffb7c02 140/195: Set inhibit-read-only when creating diff view., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree b2c020f 138/195: Fix defadvice code snippet in commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree a041902 142/195: Fix inverted key bindings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history from file when reverting buffer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0273ec 144/195: Make undo-tree-visualizer-[undo|redo]-to-x work in selection mode.,
Stefan Monnier <=
- [elpa] externals/undo-tree d0e8793 145/195: Fix diff after undo-tree-visualize-[undo|redo]-to-x in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7d12602 150/195: Fix formatting bug in absolute timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 01b4a86 151/195: Update comment about Emacs version required for persistent history., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8105f5f 143/195: Temporarily disable diff wto speed up undoing-to-x., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree aabc832 147/195: Remove unused variable., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4cba00b 163/195: Fix one of the diagrams in the Commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3a772b7 170/195: Bump copyright year and version number., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bf3a146 167/195: Disable undo-in-region by default., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree eec9edd 168/195: Silence some unused variable compiler warnings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 77c29a6 171/195: Factor out canary checking into undo-list-found-canary-p., Stefan Monnier, 2020/11/28