[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/frog-menu 4f2b086 1/2: Ensure there is at least one col
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/frog-menu 4f2b086 1/2: Ensure there is at least one column |
Date: |
Fri, 28 Jun 2019 07:52:52 -0400 (EDT) |
branch: externals/frog-menu
commit 4f2b0865af300ae535ea1756d4c2bc8617451e85
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Ensure there is at least one column
---
frog-menu.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/frog-menu.el b/frog-menu.el
index 5774114..c87018d 100644
--- a/frog-menu.el
+++ b/frog-menu.el
@@ -373,7 +373,9 @@ Returns the formatted grid string."
(let* ((length (apply #'max
(mapcar #'string-width strings)))
(wwidth (or width (frame-width)))
- (columns (min cols (/ wwidth (+ frog-menu-min-col-padding length))))
+ (columns (max 1 (min cols
+ (/ wwidth
+ (+ frog-menu-min-col-padding length)))))
(colwidth (/ wwidth columns))
(column 0)
(first t)