emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master f037979 74/92: Added rounding at the end of vertical line


From: Alexey Veretennikov
Subject: [elpa] master f037979 74/92: Added rounding at the end of vertical line
Date: Thu, 11 Jun 2015 19:48:16 +0000

branch: master
commit f0379794a70d7f3879ea204c43c452e484ea19f3
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>

    Added rounding at the end of vertical line
---
 README.md     |    3 ++-
 ztree-view.el |   16 +++++++++++-----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 18c5774..b4dae55 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
 ztree
 =====
 
-Ztree is a project dedicated to implementation of several text-tree 
applications inside Emacs. It consists of 2 subprojects: **ztree-diff** and 
**ztree-dir**(the basis of **ztree-diff**)
+Ztree is a project dedicated to implementation of several text-tree 
applications inside Emacs. It consists of 2 subprojects: **ztree-diff** and 
**ztree-dir**(the basis of **ztree-diff**). Available in MELPA 
(http://melpa.milkbox.net/#/).
+
 
 ztree-diff
 ==========
diff --git a/ztree-view.el b/ztree-view.el
index a8b4d6a..d1f71a4 100644
--- a/ztree-view.el
+++ b/ztree-view.el
@@ -346,11 +346,17 @@ list of leafs"
     (put-text-property (1- (point)) (point) 'face (if face face 
'ztreep-arrow-face))))
 
 (defun ztree-draw-vertical-line (y1 y2 x &optional face)
-  (if (> y1 y2)
-      (dotimes (y (1+ (- y1 y2)))
-        (ztree-draw-char ?\| x (+ y2 y) face))
-    (dotimes (y (1+ (- y2 y1)))
-      (ztree-draw-char ?\| x (+ y1 y) face))))
+  "Draw a vertical line of '|' characters finishing with '`' character"
+  (let ((count (abs (- y1 y2)))) 
+    (if (> y1 y2)
+        (progn
+          (dotimes (y count)
+            (ztree-draw-char ?\| x (+ y2 y) face))
+          (ztree-draw-char ?\` x (+ y2 count) face))
+      (progn
+        (dotimes (y count)
+          (ztree-draw-char ?\| x (+ y1 y) face))
+        (ztree-draw-char ?\` x (+ y1 count) face)))))        
 
 (defun ztree-draw-horizontal-line (x1 x2 y)
   (if (> x1 x2)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]