diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-08 11:48:21 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-08 11:48:43 +0100 |
| commit | 69407ed50dc51ab6d64a885ffca510ea92da4012 (patch) | |
| tree | 28b9cdd00814f16296ffa293dc2f6a63a9016f1a | |
| parent | 4585163bc262d7e4b86e2cadaebd7bcd0ad16ed3 (diff) | |
corfu--popup-show: Use default-font-width to determine character width
| -rw-r--r-- | corfu.el | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -86,7 +86,7 @@ completion began less than that number of seconds ago." "List of modes excluded by `corfu-global-mode'." :type '(repeat symbol)) -(defcustom corfu-margin-width 0.4 +(defcustom corfu-margin-width 0.6 "Width of the margin in units of the character width." :type 'float) @@ -375,7 +375,7 @@ completion began less than that number of seconds ago." (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* ((ch (default-line-height)) - (cw (round (* ch (frame-char-width)) (frame-char-height))) + (cw (default-font-width)) (mw (ceiling (* cw corfu-margin-width))) (bw (ceiling (* cw (min corfu-margin-width corfu-bar-width)))) (margin (propertize " " 'display `(space :width (,mw)))) |
