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

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

[elpa] externals/corfu 69407ed 2/2: corfu--popup-show: Use default-font-


From: ELPA Syncer
Subject: [elpa] externals/corfu 69407ed 2/2: corfu--popup-show: Use default-font-width to determine character width
Date: Mon, 8 Nov 2021 05:57:15 -0500 (EST)

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

    corfu--popup-show: Use default-font-width to determine character width
---
 corfu.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index 6918757..5f3f228 100644
--- a/corfu.el
+++ b/corfu.el
@@ -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))))



reply via email to

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