[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu d7c2fabbc6 3/9: Fringe bitmaps have a width restr
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu d7c2fabbc6 3/9: Fringe bitmaps have a width restriction 1 <= w <= 16 |
Date: |
Tue, 5 Nov 2024 03:58:05 -0500 (EST) |
branch: externals/corfu
commit d7c2fabbc6ae6a295895188e0a38524a69db09da
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Fringe bitmaps have a width restriction 1 <= w <= 16
---
corfu.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/corfu.el b/corfu.el
index 40247efca9..3d820318dc 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1015,11 +1015,13 @@ A scroll bar is displayed from LO to LO+BAR."
(with-current-buffer (corfu--make-buffer " *corfu*")
(let* ((ch (default-line-height))
(cw (default-font-width))
- (fringe (display-graphic-p))
(ml (ceiling (* cw corfu-left-margin-width)))
(bw (ceiling (* cw corfu-scroll-bar-width)))
(mr (max bw (ceiling (* cw corfu-right-margin-width))))
(marginl (and (> ml 0) (propertize " " 'display `(space :width
(,ml)))))
+ ;; PROBLEM: Even if the fringe is allowed to be larger, fringe
+ ;; bitmaps can only have a width between 1 and 16. :(
+ (fringe (and (<= 1 mr 16) (display-graphic-p)))
(sbar (if fringe
#(" " 0 1 (display (right-fringe corfu--bar
corfu-scroll-bar)))
(concat (propertize " " 'display `(space :align-to (-
right (,bw))))
@@ -1042,11 +1044,13 @@ A scroll bar is displayed from LO to LO+BAR."
(y (if (> (+ yb (* corfu-count ch) lh lh) (frame-pixel-height))
(- yb pheight lh border border)
yb))
- (row 0))
+ (row 0)
+ (bbits (1- (ash 1 bw))))
(setq right-fringe-width (if fringe mr 0))
- (when (and (> right-fringe-width 0) (not (fringe-bitmap-p
'corfu--bar)))
+ (when (and (> right-fringe-width 0) (not (eq (get 'corfu--bar
'corfu--bar-bits) bbits)))
+ (define-fringe-bitmap 'corfu--bar (vector (put 'corfu--bar
'corfu--bar-bits bbits))
+ 1 mr '(top periodic))
(define-fringe-bitmap 'corfu--nil [])
- (define-fringe-bitmap 'corfu--bar (vector (1- (ash 1 bw))) 1 mr
'(top periodic))
;; Fringe bitmaps require symbol face specification, define internal
faces.
(set-face-attribute (make-face 'corfu--bar-cur) nil
:inherit '(corfu-scroll-bar corfu-current)))
- [elpa] externals/corfu updated (44424e7d04 -> 37d4ed3ca0), ELPA Syncer, 2024/11/05
- [elpa] externals/corfu 08c3aeb46c 1/9: Avoid truncation if scrollbar is shown in the fringe, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu 41ec0baa6b 2/9: Make right margin part of the fringe, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu d7c2fabbc6 3/9: Fringe bitmaps have a width restriction 1 <= w <= 16,
ELPA Syncer <=
- [elpa] externals/corfu a297daee27 4/9: Restrict the fringe width to 16, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu 09e70155c2 5/9: Use the fringe symmetrically on both sides, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu 94d95d2347 7/9: Move truncation back to corfu--format-candidates, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu 23509b6fd3 8/9: Expand comment regarding HDPi systems, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu dc85ee32eb 6/9: Preserve corfu-bar-width and corfu-bar face for compatibility, ELPA Syncer, 2024/11/05
- [elpa] externals/corfu 37d4ed3ca0 9/9: Reduce popup width fluctuations, ELPA Syncer, 2024/11/05