[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 95599db 100/195: Fixed bug in visualizer sele
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 95599db 100/195: Fixed bug in visualizer selection mode when timestamps are displayed. |
Date: |
Sat, 28 Nov 2020 13:41:30 -0500 (EST) |
branch: externals/undo-tree
commit 95599db50b19d3e083972e881765f98ef61f4027
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Fixed bug in visualizer selection mode when timestamps are displayed.
---
undo-tree.el | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index ad2a1a6..04ea10c 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -637,6 +637,9 @@
;; `undo-tree-undo-1' and `undo-tree-redo-1' functions, which now take an
;; additional optional argument to preserve timestamps
;; * preserve timestamps when generating diff for visualizer diff view
+;; * fixed bug in `undo-tree-visualizer-select-left' and
+;; `undo-tree-visualizer-select-right' when using selection mode whilst
+;; timestamps are displayed
;;
;; Version 0.4
;; * implemented persistent history storage: `undo-tree-save-history' and
@@ -3557,16 +3560,18 @@ at mouse event POS."
(interactive "p")
(let ((pos (point))
(end (line-end-position))
+ (current (get-text-property (point) 'undo-tree-node))
node)
(catch 'end
(dotimes (i arg)
- (while (not node)
+ (while (or (null node) (eq node current))
(forward-char)
(setq node (get-text-property (point) 'undo-tree-node))
(when (= (point) end) (throw 'end t)))))
- (goto-char (if node (undo-tree-node-marker node) pos))
- (when (and undo-tree-visualizer-diff node)
- (undo-tree-visualizer-update-diff node))))
+ (unless (eq node current)
+ (goto-char (if node (undo-tree-node-marker node) pos))
+ (when (and undo-tree-visualizer-diff node)
+ (undo-tree-visualizer-update-diff node)))))
(defun undo-tree-visualizer-select-left (&optional arg)
@@ -3574,16 +3579,18 @@ at mouse event POS."
(interactive "p")
(let ((pos (point))
(beg (line-beginning-position))
+ (current (get-text-property (point) 'undo-tree-node))
node)
(catch 'beg
(dotimes (i arg)
- (while (not node)
+ (while (or (null node) (eq node current))
(backward-char)
(setq node (get-text-property (point) 'undo-tree-node))
(when (= (point) beg) (throw 'beg t)))))
- (goto-char (if node (undo-tree-node-marker node) pos))
- (when (and undo-tree-visualizer-diff node)
- (undo-tree-visualizer-update-diff node))))
+ (unless (eq node current)
+ (goto-char (if node (undo-tree-node-marker node) pos))
+ (when (and undo-tree-visualizer-diff node)
+ (undo-tree-visualizer-update-diff node)))))
- [elpa] externals/undo-tree e8215a7 078/195: Minor typo fixes in comments., (continued)
- [elpa] externals/undo-tree e8215a7 078/195: Minor typo fixes in comments., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8697a0b 077/195: Clear registers referring to nodes being discarded from undo history., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f956d55 074/195: Added autoload cookies, and other tweaks to prepare for ELPA packaging., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4e558f8 088/195: Make various interactive commands signal an error if buffer is read-only., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e001bd5 091/195: Implemented diff display in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 1229460 095/195: Make visualizer diff buffer name into a defconst., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7fef53f 092/195: Display diff with current node in visualizer selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f3e7324 090/195: Use undo-tree-inhibit-kill-visualizer to inhibit undo-tree-kill-visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bb92692 093/195: Don't override diff-switches customization option in visualizer diff display., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree a220a42 097/195: Added registerv-make and registerv-data compatibility macros in Emacs <= 23., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 95599db 100/195: Fixed bug in visualizer selection mode when timestamps are displayed.,
Stefan Monnier <=
- [elpa] externals/undo-tree 81f1417 098/195: Added diff-no-select and diff-file-local-copy compatibility hacks, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree aa7202c 103/195: Fix the way keymaps are defined., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e69adb3 109/195: Remove now unnecessary compatibility hack for called-interactively-p., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 00ffbb6 121/195: Bump version number below which we warn against enabling persistent storage., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5df6374 128/195: Switch to lexical binding., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 9b55464 126/195: Make undo history filename match docs., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f566beb 106/195: Add customization option allowing timestamps to be displayed by default, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f3e0d93 119/195: Remove ChangeLog section from package headers., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 36b341b 112/195: Cope better if undo boundary before undo-tree-canary is missing., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 98dbabd 125/195: Implement visualizer commands to redo/undo to branch/register., Stefan Monnier, 2020/11/28