[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu bed9513 4/6: Add corfu-min/max-width for easier c
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/corfu bed9513 4/6: Add corfu-min/max-width for easier customization |
Date: |
Thu, 29 Apr 2021 13:38:53 -0400 (EDT) |
branch: externals/corfu
commit bed95134c319d95466818f52ce4f0586c67d8c2c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add corfu-min/max-width for easier customization
---
corfu.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/corfu.el b/corfu.el
index ffe41b1..b6c3688 100644
--- a/corfu.el
+++ b/corfu.el
@@ -47,10 +47,13 @@
"Maximal number of candidates to show."
:type 'integer)
-(defcustom corfu-width-limits
- (cons 15 80)
- "Popup width limits."
- :type '(cons integer integer))
+(defcustom corfu-min-width 15
+ "Popup minimum width in characters."
+ :type 'integer)
+
+(defcustom corfu-max-width 100
+ "Popup maximum width in characters."
+ :type 'integer)
(defcustom corfu-cycle nil
"Enable cycling for `corfu-next' and `corfu-previous'."
@@ -250,9 +253,9 @@ Set to nil in order to disable confirmation."
(sbar (concat
(propertize " " 'display `(space :width (,(- mw bw))))
(propertize " " 'face 'corfu-bar 'display `(space :width
(,bw)))))
- (width (min (cdr corfu-width-limits)
+ (width (min corfu-max-width
(/ (frame-width) 2)
- (apply #'max (car corfu-width-limits)
+ (apply #'max corfu-min-width
(mapcar #'string-width lines))))
(row 0)
(pos (posn-x-y (posn-at-point pos))))
- [elpa] externals/corfu updated (f5b6c5d -> 17f3fc6), Protesilaos Stavrou, 2021/04/29
- [elpa] externals/corfu bed9513 4/6: Add corfu-min/max-width for easier customization,
Protesilaos Stavrou <=
- [elpa] externals/corfu ec3e8cf 1/6: Print warning if corfu-mode is enabled on text display., Protesilaos Stavrou, 2021/04/29
- [elpa] externals/corfu 67be3fb 3/6: Add corfu-bar-width/corfu-margin-width customizable variables, Protesilaos Stavrou, 2021/04/29
- [elpa] externals/corfu 17f3fc6 6/6: Set child-frame-border on Emacs 28, Protesilaos Stavrou, 2021/04/29
- [elpa] externals/corfu a97fca9 5/6: child frame: Anti-flicker fix, Protesilaos Stavrou, 2021/04/29
- [elpa] externals/corfu b8cd63f 2/6: Add error message when completion is already in progress, Protesilaos Stavrou, 2021/04/29