emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu e8eab11bbd: corfu-make-frame: Avoid flip-over eff


From: ELPA Syncer
Subject: [elpa] externals/corfu e8eab11bbd: corfu-make-frame: Avoid flip-over effect when popup is displayed at the bottom
Date: Tue, 11 Jan 2022 12:57:24 -0500 (EST)

branch: externals/corfu
commit e8eab11bbd3ecfa6cf493ef7a8abc50d416856cf
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    corfu-make-frame: Avoid flip-over effect when popup is displayed at the 
bottom
---
 corfu.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/corfu.el b/corfu.el
index ad90667aad..14bb05ea36 100644
--- a/corfu.el
+++ b/corfu.el
@@ -384,13 +384,13 @@ The completion backend can override this with
              'resize-mode)))
          (after-make-frame-functions)
          (edge (window-inside-pixel-edges))
-         (lh (default-line-height))
+         (ch (default-line-height))
          (border (alist-get 'child-frame-border-width corfu--frame-parameters))
          (x (max border (min (+ (car edge) x (- border))
                              (- (frame-pixel-width) width))))
-         (yb (+ (cadr edge) (window-tab-line-height) y lh))
-         (y (if (> (+ yb height lh lh) (frame-pixel-height))
-                (- yb height lh 1)
+         (yb (+ (cadr edge) (window-tab-line-height) y ch))
+         (y (if (> (+ yb (* corfu-count ch) ch ch) (frame-pixel-height))
+                (- yb height ch 1)
               yb))
          (buffer (corfu--make-buffer content)))
     (unless (and (frame-live-p corfu--frame)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]