branch: externals/ivy-posframe
commit 6d697ff00ac406b919eba8665b1bc18a2b423cda
Author: feng <feng@debian>
Commit: feng <feng@debian>
Try to fix: Posframe max-width? #82
---
ivy-posframe.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index b77a05d..419c8d0 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -278,8 +278,12 @@ This variable is useful for `ivy-posframe-read-action' .")
(list
:height ivy-posframe-height
:width ivy-posframe-width
- :min-height (or ivy-posframe-min-height (+ ivy-height 1))
- :min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))))
+ :min-height (or ivy-posframe-min-height
+ (let ((height (+ ivy-height 1)))
+ (min height (or ivy-posframe-height height))))
+ :min-width (or ivy-posframe-min-width
+ (let ((width (round (* (frame-width) 0.62))))
+ (min width (or ivy-posframe-width width))))))
(defun ivy-posframe-display (str)
"Display STR via `posframe' by `ivy-posframe-style'."