branch: externals/company
commit 9acf35b7a9d72978529f641275c154af7119c995
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Fix b-c warning on Emacs < 30
---
company.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/company.el b/company.el
index 3908d9d1b6..e61b06b249 100644
--- a/company.el
+++ b/company.el
@@ -4721,16 +4721,15 @@ Delay is determined by `company-tooltip-idle-delay'."
(message-truncate-lines company-echo-truncate-lines))
(when getter
(setq company-echo-last-msg (funcall getter)))
- (when-let* ((_ (and company-echo-truncate-lines
- (active-minibuffer-window)))
+ (when-let* ((mini-window (and company-echo-truncate-lines
+ (active-minibuffer-window)))
(posn (posn-at-point
- (with-current-buffer
- (window-buffer (minibuffer-window))
+ (with-current-buffer (window-buffer mini-window)
(max (point-min)
(1- (point-max))))
- (minibuffer-window)))
+ mini-window))
(max-len (max 0
- (- (window-width (minibuffer-window))
+ (- (window-width mini-window)
(car
(posn-col-row posn))
(if preview-o