branch: elpa/popup
commit b436b636384a9ea3dc24ee962e40ffdc08729747
Merge: 333ea5e fa96fe6
Author: Jen-Chieh Shen <jcs090...@gmail.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #111 from drvink/patch-1
    
    Count only visible lines for popup direction
---
 popup.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/popup.el b/popup.el
index 6554273..9cffdab 100644
--- a/popup.el
+++ b/popup.el
@@ -439,7 +439,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