summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-01-11 18:03:52 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-01-11 18:03:52 +0100
commite8eab11bbd3ecfa6cf493ef7a8abc50d416856cf (patch)
tree20fc06a4ad75e6a9c9125cb50808b7f102d8592b
parentf8d337f1053578a88a18bb23ff44095fc85481c0 (diff)
corfu-make-frame: Avoid flip-over effect when popup is displayed at the bottom
-rw-r--r--corfu.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/corfu.el b/corfu.el
index ad90667..14bb05e 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)