summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-05-07 17:32:08 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2021-05-07 17:37:38 +0200
commit1f317e88a1e4a2c6831e1b4d329e20f4ef9fccbf (patch)
tree5884bb6ac09384f2a0d63b7dd4d1ba14f73f334d
parent36873942539d6126512737b566df4d4a5e82006f (diff)
Fix text scaling issues
-rw-r--r--corfu.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/corfu.el b/corfu.el
index 477d821..3c925b3 100644
--- a/corfu.el
+++ b/corfu.el
@@ -219,6 +219,7 @@ Set to nil in order to disable confirmation."
'resize-mode)))
(after-make-frame-functions)
(edge (window-inside-pixel-edges))
+ (fr face-remapping-alist)
(lh (default-line-height))
(x (max 0 (min (+ (car edge) x -1) (- (frame-pixel-width) width))))
(yb (+ (cadr edge) y lh))
@@ -239,7 +240,8 @@ Set to nil in order to disable confirmation."
right-fringe-width nil
left-margin-width nil
right-margin-width nil
- fringes-outside-margins 0)
+ fringes-outside-margins 0
+ face-remapping-alist fr)
(let (inhibit-modification-hooks)
(erase-buffer)
(insert content)
@@ -268,8 +270,8 @@ Set to nil in order to disable confirmation."
(defun corfu--popup-show (pos lines &optional curr lo bar)
"Show LINES as popup at POS, with CURR highlighted and scrollbar from LO to LO+BAR."
- (let* ((cw (frame-char-width))
- (ch (default-line-height))
+ (let* ((ch (default-line-height))
+ (cw (round (* ch (frame-char-width)) (frame-char-height)))
(mw (ceiling (* cw corfu-margin-width)))
(bw (ceiling (* cw (min corfu-margin-width corfu-bar-width))))
(margin (propertize " " 'display `(space :width (,mw))))