branch: elpa/popup
commit fa96fe63906b678c43c9bd9f64804ba8f38e5b8b
Author: Mark Laws <m...@60hz.org>
Commit: GitHub <nore...@github.com>

    Count only visible lines for popup direction
    
    This prevents the popup from displaying past the end of a window in GUI 
Emacs.
---
 popup.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/popup.el b/popup.el
index b67a777..b4196b1 100644
--- a/popup.el
+++ b/popup.el
@@ -436,7 +436,7 @@ usual."
   "Return a proper direction when displaying a popup on this
 window. HEIGHT is the a height of the popup, and ROW is a line
 number at the point."
-  (let* ((remaining-rows (- (max 1 (- (window-height)
+  (let* ((remaining-rows (- (max 1 (- (window-text-height)
                                       (if mode-line-format 1 0)
                                       (if header-line-format 1 0)))
                             (count-lines (window-start) (point))))

Reply via email to