summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-11-10 01:26:39 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-11-10 01:27:10 +0100
commit53d2aec2b5f909fe6a2962eff87fedf151f6a39a (patch)
tree0c9b2301401cc43b43842be317814db5ff6227a1
parent4c8c3f75fbbef98de69fed4ae78e556c6d655140 (diff)
Revert "Minor cleanup"
This reverts commit 2bd0614c741584221a9c15b7fe3163c446153c6d.
-rw-r--r--corfu.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/corfu.el b/corfu.el
index bda94dd..52e0cab 100644
--- a/corfu.el
+++ b/corfu.el
@@ -370,9 +370,9 @@ completion began less than that number of seconds ago."
(set-window-parameter win 'no-delete-other-windows t)
(set-window-parameter win 'no-other-window t))
;; XXX HACK Make the frame invisible before moving the popup in order to avoid flicker.
- (unless (equal (frame-position corfu--frame) (cons x y))
- (make-frame-invisible corfu--frame)
- (set-frame-position corfu--frame x y))
+ (unless (eq (cdr (frame-position corfu--frame)) y)
+ (make-frame-invisible corfu--frame))
+ (set-frame-position corfu--frame x y)
(set-frame-size corfu--frame width height t)
(make-frame-visible corfu--frame)))
@@ -604,8 +604,8 @@ completion began less than that number of seconds ago."
(string-trim (replace-regexp-in-string "[ \t]*\n[ \t]*" " " s)))))
(let* ((cw (cl-loop for x in cands maximize (string-width (car x))))
(pw (cl-loop for x in cands maximize (string-width (cadr x))))
- (sw (cl-loop for x in cands maximize (string-width (caddr x))))
(pw (if (> pw 0) (1+ pw) 0))
+ (sw (cl-loop for x in cands maximize (string-width (caddr x))))
(sw (if (> sw 0) (1+ sw) 0))
(width (+ pw cw sw)))
(when (< width corfu-min-width)