[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1279a61 28/92: Added face argument for ztree-draw-char and
From: |
Alexey Veretennikov |
Subject: |
[elpa] master 1279a61 28/92: Added face argument for ztree-draw-char and set face for vertical line in 2 trees mode |
Date: |
Thu, 11 Jun 2015 19:47:58 +0000 |
branch: master
commit 1279a61b9c891e110ef1020ebd42b66ae6a4d9c2
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>
Added face argument for ztree-draw-char and set face for vertical line in 2
trees mode
---
ztree-view.el | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ztree-view.el b/ztree-view.el
index 9cb72d0..f6fbf0c 100644
--- a/ztree-view.el
+++ b/ztree-view.el
@@ -269,7 +269,7 @@ list of leafs"
apparently shall not be visible"
(ztree-find ztree-filter-list #'(lambda (rx) (string-match rx node))))
-(defun ztree-draw-char (c x y)
+(defun ztree-draw-char (c x y &optional face)
"Draw char c at the position (1-based) (x y)"
(save-excursion
(scroll-to-line y)
@@ -277,14 +277,14 @@ apparently shall not be visible"
(goto-char (+ x (-(point) 1)))
(delete-char 1)
(insert-char c 1)
- (set-text-properties (1- (point)) (point) '(face ztreep-arrow-face))))
+ (put-text-property (1- (point)) (point) 'face (if face face
'ztreep-arrow-face))))
-(defun ztree-draw-vertical-line (y1 y2 x)
+(defun ztree-draw-vertical-line (y1 y2 x &optional face)
(if (> y1 y2)
(dotimes (y (1+ (- y1 y2)))
- (ztree-draw-char ?\| x (+ y2 y)))
+ (ztree-draw-char ?\| x (+ y2 y) face))
(dotimes (y (1+ (- y2 y1)))
- (ztree-draw-char ?\| x (+ y1 y)))))
+ (ztree-draw-char ?\| x (+ y1 y) face))))
(defun ztree-draw-horizontal-line (x1 x2 y)
(if (> x1 x2)
@@ -361,7 +361,8 @@ apparently shall not be visible"
;; draw the vertical line in the middle of the window
(ztree-draw-vertical-line ztree-start-line
(1- (+ num-of-items ztree-start-line))
- (/ width 2))
+ (/ width 2)
+ 'vertical-border)
(ztree-draw-tree tree 0 (/ width 2))))))
- [elpa] master c7eb2c2 02/92: Initial import - fork from difftree, (continued)
- [elpa] master c7eb2c2 02/92: Initial import - fork from difftree, Alexey Veretennikov, 2015/06/11
- [elpa] master 7c739c4 11/92: Added faces for arrows and [+] signs, Alexey Veretennikov, 2015/06/11
- [elpa] master aa7f07a 10/92: Added Backspace support, Alexey Veretennikov, 2015/06/11
- [elpa] master eb4ad8e 19/92: Removed test code!, Alexey Veretennikov, 2015/06/11
- [elpa] master 457f48e 13/92: Updated readme, Alexey Veretennikov, 2015/06/11
- [elpa] master 33fe3a2 14/92: Added support for double backspace for closing open directories, Alexey Veretennikov, 2015/06/11
- [elpa] master 70d8bc5 17/92: Updated - aligned 80 chars in width, Alexey Veretennikov, 2015/06/11
- [elpa] master 5bbcfcf 18/92: Started diff model, Alexey Veretennikov, 2015/06/11
- [elpa] master b1de530 16/92: Isolated tree 'control' from the directory model, Alexey Veretennikov, 2015/06/11
- [elpa] master 7eb950e 22/92: Updated readme, Alexey Veretennikov, 2015/06/11
- [elpa] master 1279a61 28/92: Added face argument for ztree-draw-char and set face for vertical line in 2 trees mode,
Alexey Veretennikov <=
- [elpa] master 120ffcb 15/92: Preparing to isolate ztree from directories api, Alexey Veretennikov, 2015/06/11
- [elpa] master 41d4c09 23/92: Fixed model issue when all files in added subtree looks like directories, Alexey Veretennikov, 2015/06/11
- [elpa] master 2f888c5 26/92: Added util file, Alexey Veretennikov, 2015/06/11
- [elpa] master 41ab149 29/92: Added sorting to the tree, Alexey Veretennikov, 2015/06/11
- [elpa] master d0e255e 20/92: Implemented difftree model, Alexey Veretennikov, 2015/06/11
- [elpa] master a39e8c6 24/92: Started preparation for 2 column tree, Alexey Veretennikov, 2015/06/11
- [elpa] master 3260487 25/92: Preparing for the double tree drawing, Alexey Veretennikov, 2015/06/11
- [elpa] master 8685235 27/92: Added support for 2 trees, Alexey Veretennikov, 2015/06/11
- [elpa] master 28fa370 33/92: Reimplemented search for node by line using hash table, Alexey Veretennikov, 2015/06/11
- [elpa] master 413cff4 30/92: Drawing trees only to visible items, Alexey Veretennikov, 2015/06/11