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

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

[elpa] master 8cc5c8f 08/13: Fixed bug in enwc-refresh-widths


From: Ian Dunn
Subject: [elpa] master 8cc5c8f 08/13: Fixed bug in enwc-refresh-widths
Date: Sat, 15 Apr 2017 16:02:44 -0400 (EDT)

branch: master
commit 8cc5c8ffe5427ca280cb74aecf2a9922b00f6170
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    Fixed bug in enwc-refresh-widths
    
    * enwc.el (enwc-refresh-widths): Check type of input argument.
---
 enwc.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/enwc.el b/enwc.el
index bf424c7..e194494 100644
--- a/enwc.el
+++ b/enwc.el
@@ -497,11 +497,13 @@ ARGS is only for compatibility with the calling function."
         (mapcar
          (lambda (spec)
            (pcase-let* (((cl-struct enwc-column-spec detail display conv) spec)
-                        (new-max (seq-max
-                                  (map-apply
-                                   (lambda (id nw)
-                                     (length (funcall conv (alist-get detail 
nw))))
-                                   networks)))
+                        (new-max (if (mapp networks)
+                                     (seq-max
+                                      (map-apply
+                                       (lambda (id nw)
+                                         (length (funcall conv (alist-get 
detail nw))))
+                                       networks))
+                                   0))
                         (min-width (+ (length display) 2)))
              (setf (enwc-column-spec-width spec) (max new-max min-width)))
            spec)



reply via email to

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