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

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

[elpa] externals/boxy e637cbf 4/8: Using string-width instead of length


From: ELPA Syncer
Subject: [elpa] externals/boxy e637cbf 4/8: Using string-width instead of length
Date: Wed, 13 Oct 2021 15:57:09 -0400 (EDT)

branch: externals/boxy
commit e637cbf04df393c2b41d9f1ea87243070fc7ddb7
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>

    Using string-width instead of length
---
 boxy.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/boxy.el b/boxy.el
index 8323029..62ccfe5 100644
--- a/boxy.el
+++ b/boxy.el
@@ -915,7 +915,7 @@ Uses `boxy--offset' to determine row and column offsets."
                                   (let ((remaining-chars (- (save-excursion 
(end-of-line)
                                                                             
(current-column))
                                                             (current-column))))
-                                    (delete-char (min (length str) 
remaining-chars))))))
+                                    (delete-char (min (string-width str) 
remaining-chars))))))
             (draw (cons top left)
                   (concat (cond ((and double dashed) "┏")
                                 (double "╔")
@@ -983,7 +983,7 @@ Uses `boxy--offset' to determine row and column offsets."
                             (* 2 padding)))
              (width (+ base-width
                        (if (slot-boundp box :name)
-                           (with-slots (name) box (length name))
+                           (with-slots (name) box (string-width name))
                          0)))
              (children (boxy--get-children box)))
         (setq stored-width
@@ -1014,7 +1014,7 @@ Uses `boxy--offset' to determine row and column offsets."
                                                   (mapcar #'boxy--get-width 
row)
                                                   (* -1 margin)))
                                                rows))))
-                  (if (> width (+ (* 2 padding) children-width))
+                  (if (> width (+ 1 (* 2 padding) children-width))
                       width
                     (+ base-width children-width)))))))))
 



reply via email to

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