[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 090299074e 1/8: Use :extend=t for corfu-current,
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 090299074e 1/8: Use :extend=t for corfu-current, Simplify |
Date: |
Fri, 1 Nov 2024 12:58:24 -0400 (EDT) |
branch: externals/corfu
commit 090299074e0153340c20207ef1ec5efeafeac51d
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use :extend=t for corfu-current, Simplify
---
corfu.el | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/corfu.el b/corfu.el
index f8c64a9462..ea01161255 100644
--- a/corfu.el
+++ b/corfu.el
@@ -209,10 +209,10 @@ See also the settings `corfu-auto-delay',
`corfu-auto-prefix' and
(defface corfu-current
'((((class color) (min-colors 88) (background dark))
- :background "#00415e" :foreground "white")
+ :background "#00415e" :foreground "white" :extend t)
(((class color) (min-colors 88) (background light))
- :background "#c0efff" :foreground "black")
- (t :background "blue" :foreground "white"))
+ :background "#c0efff" :foreground "black" :extend t)
+ (t :background "blue" :foreground "white" :extend t))
"Face used to highlight the currently selected candidate.")
(defface corfu-bar
@@ -1025,10 +1025,8 @@ A scroll bar is displayed from LO to LO+BAR."
(mr (ceiling (* cw corfu-right-margin-width)))
(bw (ceiling (min mr (* cw corfu-bar-width))))
(marginl (and (> ml 0) (propertize " " 'display `(space :width
(,ml)))))
- (marginr (and (> mr 0) (propertize " " 'display `(space :align-to
right))))
(sbar (when (> bw 0)
- (concat (propertize " " 'display `(space :align-to (-
right (,mr))))
- (propertize " " 'display `(space :width (,(- mr
bw))))
+ (concat (propertize " " 'display `(space :align-to (-
right (,bw))))
(propertize " " 'face 'corfu-bar 'display `(space
:width (,bw))))))
(pos (posn-x-y pos))
(width (+ (* width cw) ml mr))
@@ -1046,17 +1044,17 @@ A scroll bar is displayed from LO to LO+BAR."
(row 0))
(with-silent-modifications
(erase-buffer)
- (insert (mapconcat (lambda (line)
- (let ((str (concat marginl line
- (if (and lo (<= lo row (+ lo
bar)))
- sbar
- marginr))))
- (when (eq row curr)
- (add-face-text-property
- 0 (length str) 'corfu-current 'append str))
- (cl-incf row)
- str))
- lines "\n"))
+ (apply #'insert
+ (cl-loop for line in lines collect
+ (let ((str (concat
+ marginl line
+ (and lo (<= lo row (+ lo bar)) sbar)
+ "\n")))
+ (when (= row curr)
+ (add-face-text-property
+ 0 (length str) 'corfu-current 'append str))
+ (cl-incf row)
+ str)))
(goto-char (point-min)))
(setq corfu--frame (corfu--make-frame corfu--frame x y width
height))))))
- [elpa] externals/corfu updated (16d5aef839 -> 2b81c26dd7), ELPA Syncer, 2024/11/01
- [elpa] externals/corfu 0afd1f7266 6/8: Force fringe update, ELPA Syncer, 2024/11/01
- [elpa] externals/corfu e7a22ac6d6 4/8: Use fringe for the scroll bar, ELPA Syncer, 2024/11/01
- [elpa] externals/corfu a0ac2861e9 3/8: Suffixes are always prefixed with space, ELPA Syncer, 2024/11/01
- [elpa] externals/corfu 38acda3546 5/8: Ensure right-margin-width >= bar-width, ELPA Syncer, 2024/11/01
- [elpa] externals/corfu d20892abbc 2/8: format-candidates: ensure suffix is right-aligned when possible, ELPA Syncer, 2024/11/01
- [elpa] externals/corfu 090299074e 1/8: Use :extend=t for corfu-current, Simplify,
ELPA Syncer <=
- [elpa] externals/corfu 2b81c26dd7 8/8: Fix corfu--popup-show: curr can be nil, ELPA Syncer, 2024/11/01
- [elpa] externals/corfu 1ad0336693 7/8: Update changelog, ELPA Syncer, 2024/11/01