[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vundo 1737bcee28 18/58: Add vundo-compact-display
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vundo 1737bcee28 18/58: Add vundo-compact-display |
Date: |
Fri, 15 Apr 2022 12:58:11 -0400 (EDT) |
branch: externals/vundo
commit 1737bcee281256e6cb1f51073b245ed62d4c8a64
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
Add vundo-compact-display
* vundo.el (vundo-compact-display): New option.
(vundo--draw-tree): Draw shorter stem according to vundo-compact-display.
---
vundo.el | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/vundo.el b/vundo.el
index 1f1f346714..5ba9ad4180 100644
--- a/vundo.el
+++ b/vundo.el
@@ -125,6 +125,17 @@
(last-branch . ?└))
"Unicode symbols to draw vundo tree.")
+(defcustom vundo-compact-display nil
+ "Show a more compact tree display if non-nil.
+Basically we display
+
+ ○─○─○ instead of ○──○──○
+ │ └─● │ └──●
+ ├─○ ├──○
+ └─○ └──○
+"
+ :type 'boolean)
+
(defcustom vundo-glyph-alist vundo-ascii-symbols
"Alist mapping tree parts to characters used to draw a tree.
Keys are names for different parts of a tree, values are
@@ -423,18 +434,23 @@ Translate according to ‘vundo-glyph-alist’."
'face 'vundo-stem)))
;; Make room for inserting the new node.
(unless (looking-at "$")
- (delete-char 3))
+ (delete-char (if vundo-compact-display 2 3)))
;; Insert the new node.
(if (eq (point) planned-point)
- (insert (propertize (vundo--translate "──")
- 'face 'vundo-stem)
+ (insert (propertize
+ (vundo--translate
+ (if vundo-compact-display "─" "──"))
+ 'face 'vundo-stem)
(propertize (vundo--translate "○")
'face 'vundo-node))
;; Delete the previously inserted |.
(delete-char -1)
- (insert (propertize (vundo--translate
- (if node-last-child-p "└──" "├──"))
- 'face 'vundo-stem))
+ (insert (propertize
+ (vundo--translate
+ (if node-last-child-p
+ (if vundo-compact-display "└─" "└──")
+ (if vundo-compact-display "├─" "├──")))
+ 'face 'vundo-stem))
(insert (propertize (vundo--translate "○")
'face 'vundo-node))))))
;; Store point so we can later come back to this node.
- [elpa] externals/vundo 00e5c4e73c 54/58: * vundo.el (vundo-mode): Avoid duplicates in evil-emacs-state-modes., (continued)
- [elpa] externals/vundo 00e5c4e73c 54/58: * vundo.el (vundo-mode): Avoid duplicates in evil-emacs-state-modes., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 6c15a96fb6 57/58: * test/vundo-test.el (vundo-test--3): Skip this test in batch mode., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 0e3af84944 47/58: Prepare for publish, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 8067005e53 56/58: Merge branch 'pr-remove-redundant-eqv-list-of', ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 2bb4bc8404 04/58: Fix nodes' face, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo a3e27e84f1 05/58: Add an option that controls the side on which we display vundo window, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 578a9f6be1 10/58: Update tests to accommodate read-only-ness, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo b996e201d8 12/58: * README.txt: Add notice, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo e136164f77 07/58: * vundo.el (vundo-next): move till end when asked to move too far, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 31b1491178 31/58: * README.txt: Add comparison., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 1737bcee28 18/58: Add vundo-compact-display,
ELPA Syncer <=
- [elpa] externals/vundo 06de574d4f 24/58: Ignore position-only records when generating mod-list, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 6a408d000f 39/58: * vundo.el (vundo--check-for-command): Add declaration for edebug., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo ed0d7d42d8 38/58: Replace lists with vectors for the main vundo-m lists, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 22345f42b1 45/58: * vundo.el (vundo): Replace let* with let., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo b93e15e0c2 50/58: * vundo.el: Sync from README., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 8d7e80d149 40/58: * vundo.el (vundo--refresh-buffer): Update docstring., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 4341d838aa 44/58: * vundo.el (vundo-glyph-alist): Escape backtick in docstring., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 6acda40607 42/58: Fix vundo-forward, ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 377194b705 58/58: * vundo.el: Fix dependency tag., ELPA Syncer, 2022/04/15
- [elpa] externals/vundo 9657909b43 51/58: Trim a nreverse call in vundo--eqv-list-of, ELPA Syncer, 2022/04/15