[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 4877b0f 008/195: Added markers to record posi
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 4877b0f 008/195: Added markers to record positions of nodes in visualizer. |
Date: |
Sat, 28 Nov 2020 13:41:10 -0500 (EST) |
branch: externals/undo-tree
commit 4877b0f2adfc17f7876d37e53a342be3959b080e
Author: tsc25 <tsc25@cantab.net>
Commit: tsc25 <tsc25@cantab.net>
Added markers to record positions of nodes in visualizer.
Implemeneted highlighting of current node.
---
undo-tree.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/undo-tree.el b/undo-tree.el
index a1dda4c..c33e656 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -360,13 +360,17 @@ using `undo-tree-redo'."
;; prepare *undo-tree* buffer, then draw tree in it
(let ((undo-tree buffer-undo-tree))
(switch-to-buffer-other-window " *undo-tree*")
+ (setq cursor-type nil)
(erase-buffer)
(undo-tree-move-down 1) ; top margin
(undo-tree-compute-widths undo-tree)
(undo-tree-move-forward
(+ (undo-tree-node-char-lwidth (undo-tree-root undo-tree))
2)) ; left margin
- (undo-tree-draw-subtree (undo-tree-root undo-tree))))
+ (undo-tree-draw-subtree (undo-tree-root undo-tree))
+ (goto-char (undo-tree-node-marker (undo-tree-current undo-tree)))
+ (put-text-property (point) (1+ (point)) 'face '(foreground-color . "red"))
+ ))
@@ -377,6 +381,7 @@ using `undo-tree-redo'."
;; draw node itself
(undo-tree-insert ?o)
(backward-char 1)
+ (move-marker (setf (undo-tree-node-marker node) (make-marker)) (point))
(cond
;; if we're at a leaf node, we're done
- [elpa] externals/undo-tree 159c9b4 005/195: Implemented undo-tree branch switching., (continued)
- [elpa] externals/undo-tree 159c9b4 005/195: Implemented undo-tree branch switching., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 0bbfa5c 026/195: Tweaked commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 86fb076 034/195: Fixed keybindings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 948386b 035/195: Modified undo-tree-visualizer-active-branch-face, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bca52bf 042/195: Added undo-tree-mode-lighter customization option, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 50ccefd 043/195: Fixed bug in undo-tree-discard-node., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree fd3fc5c 046/195: Pass null argument to kill-buffer call in undo-tree-visualizer-quit,, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 45751ef 050/195: Fixed bug in undo-tree-switch-branch., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f454e88 001/195: Started project to add vim-like undo tree handling to emacs., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree b2eab5a 016/195: Made visualizer buffer read-only., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4877b0f 008/195: Added markers to record positions of nodes in visualizer.,
Stefan Monnier <=
- [elpa] externals/undo-tree 7f3c87d 030/195: Added installation instructions to commentary, and keybinding documentation, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c8b2659 032/195: Prevented undo-tree-kill-visualizer from killing visualizer when undoing/redoing, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c041ce8 033/195: Added missing (eval-when-compile (require 'cl)) line., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3b1a83f 036/195: Fixed undo-tree-visualizer-quit to make it remove kill visualizer hook, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f3fc5cd 037/195: Modified undo-tree-undo/redo to always replace redo/undo entries, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f93420b 038/195: Remap undo-only to undo-tree-undo in undo-tree-map., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f8c3abf 039/195: Replaced save-excursion's with with-current-buffer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 723eeeb 040/195: Improved undo-tree-visualizer-quit behaviour, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8871f91 041/195: Added header containing git repository URL., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3f5cc71 045/195: Updated commentary to include register commands,, Stefan Monnier, 2020/11/28