branch: externals/ivy-hydra
commit ae9b121b834a68d11f79ca27b1e5c8790149ba2f
Author: Basil L. Contovounesios <[email protected]>
Commit: Basil L. Contovounesios <[email protected]>
Avoid face blending errors when loading swiper.el
* swiper.el (swiper--recompute-background-faces): Avoid passing nil
to colir-blend, which causes an error while loading swiper.el
Re: #2748.
---
swiper.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/swiper.el b/swiper.el
index bca5a47..56f6e43 100644
--- a/swiper.el
+++ b/swiper.el
@@ -108,13 +108,12 @@
swiper-background-match-face-4))
(colir-compose-method #'colir-compose-soft-light))
(cl-mapc (lambda (f1 f2)
- (let ((bg (face-background f1)))
+ (let* ((bg (face-background f1))
+ ;; FIXME: (colir-color-parse "color-22") is nil.
+ (bg (and bg (colir-color-parse bg))))
(when bg
- (set-face-background
- f2
- (colir-blend
- (colir-color-parse bg)
- (colir-color-parse "#ffffff"))))))
+ (setq bg (colir-blend bg (colir-color-parse "#ffffff")))
+ (set-face-background f2 bg))))
swiper-faces
faces)))
(swiper--recompute-background-faces)