emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company e64e6e2 4/4: Adjust window-width more accuratel


From: ELPA Syncer
Subject: [elpa] externals/company e64e6e2 4/4: Adjust window-width more accurately
Date: Sun, 28 Mar 2021 22:57:07 -0400 (EDT)

branch: externals/company
commit e64e6e252da804d66204679de8060b83606c5bcb
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Adjust window-width more accurately
---
 company.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index 29182c1..1a915aa 100644
--- a/company.el
+++ b/company.el
@@ -2919,7 +2919,6 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
           len (min limit len)
           lines-copy lines)
 
-    (cl-decf window-width (* 2 company-tooltip-margin))
     (when scrollbar-bounds (cl-decf window-width))
 
     (when company-format-margin-function
@@ -2937,6 +2936,9 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
     (setq left-margin-size (apply #'max company-tooltip-margin
                                   (mapcar #'length left-margins)))
 
+    (cl-decf window-width company-tooltip-margin)
+    (cl-decf window-width left-margin-size)
+
     (dotimes (_ len)
       (let* ((value (pop lines-copy))
              (annotation (company-call-backend 'annotation value))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]