[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 64671bf 1/2: Simplify
From: |
ELPA Syncer |
Subject: |
[elpa] externals/company 64671bf 1/2: Simplify |
Date: |
Mon, 3 May 2021 16:57:06 -0400 (EDT) |
branch: externals/company
commit 64671bf5f7f3fb7d856201f0913571514de1aa1f
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Simplify
---
company.el | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/company.el b/company.el
index fbd9363..236de36 100644
--- a/company.el
+++ b/company.el
@@ -1448,14 +1448,12 @@ end of the match."
(eq 'auto-scale (car company-icon-size)))
(let ((base-size (cdr company-icon-size))
(dfw (default-font-width))
- size)
- (setq size (if (> (default-font-height)
- (* 2 base-size))
- (* 2 base-size)
- base-size))
- (when (> size (* 2 dfw))
- (setq size (* 2 dfw)))
- size))))
+ (dfh (default-font-height)))
+ (min
+ (if (> dfh (* 2 base-size))
+ (* 2 base-size)
+ base-size)
+ (* 2 dfw))))))
(spec (list 'image
:file (expand-file-name icon-file root-dir)
:type 'svg