branch: externals/company
commit bf1d05bdbb03fceeea78b6b1ffe8880cbe8e894f
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
company-echo-show: Account for preview overlay and multiline contents
---
company.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/company.el b/company.el
index f4a32f946f..fba665ea55 100644
--- a/company.el
+++ b/company.el
@@ -4723,9 +4723,9 @@ Delay is determined by `company-tooltip-idle-delay'."
(setq max-len
(max 0
(- (window-width (minibuffer-window))
- (with-selected-window (minibuffer-window)
- (- (point) (save-excursion (vertical-motion 0)
- (point))))
+ (car
+ (posn-col-row (posn-at-point (point-max)
+ (minibuffer-window))))
4)))
(when (> (length company-echo-last-msg) max-len)
(setq company-echo-last-msg (substring company-echo-last-msg 0
max-len))))