branch: externals/company
commit fbd8d73383efdb5f34632dc0b06d27ebc9a8b130
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Use with-selected-window too, to be safe when c-e-s is called not from
minibuffer
---
company.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/company.el b/company.el
index 9c483879ff..f4a32f946f 100644
--- a/company.el
+++ b/company.el
@@ -4723,8 +4723,9 @@ Delay is determined by `company-tooltip-idle-delay'."
(setq max-len
(max 0
(- (window-width (minibuffer-window))
- (- (point) (save-excursion (vertical-motion 0)
- (point)))
+ (with-selected-window (minibuffer-window)
+ (- (point) (save-excursion (vertical-motion 0)
+ (point))))
4)))
(when (> (length company-echo-last-msg) max-len)
(setq company-echo-last-msg (substring company-echo-last-msg 0
max-len))))