branch: master
commit e1690ba8b558971e99a818408881264838bbe62f
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy-overlay.el (ivy-display-function-overlay): Fall back
When there's no vertical space.
Fixes #1136
---
ivy-overlay.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ivy-overlay.el b/ivy-overlay.el
index fff72e9..c063421 100644
--- a/ivy-overlay.el
+++ b/ivy-overlay.el
@@ -87,8 +87,10 @@ Then attach the overlay the character before point."
Hide the minibuffer contents and cursor."
(if (save-selected-window
(select-window (ivy-state-window ivy-last))
- (< (- (window-width) (current-column))
- (length (ivy-state-current ivy-last))))
+ (or
+ (< (- (window-width) (current-column))
+ (length (ivy-state-current ivy-last)))
+ (<= (window-height) (+ ivy-height 2))))
(let ((buffer-undo-list t))
(save-excursion
(forward-line 1)