branch: externals/company
commit 3bc91c852a11c3a52c0410a18e50c5512251a5a6
Author: YE <yugen...@gmail.com>
Commit: YE <yugen...@gmail.com>

    Fix width of tooltip offset lines number display
---
 company.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/company.el b/company.el
index 6d34b78..73748b0 100644
--- a/company.el
+++ b/company.el
@@ -3172,7 +3172,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
           (numbered (if company-show-numbers 0 99999))
           new)
       (when previous
-        (push (company--scrollpos-line previous width) new))
+        (push (company--scrollpos-line previous width left-margin-size) new))
 
       (dotimes (i len)
         (let* ((item (pop items))
@@ -3199,7 +3199,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
                 new)))
 
       (when remainder
-        (push (company--scrollpos-line remainder width) new))
+        (push (company--scrollpos-line remainder width left-margin-size) new))
 
       (cons
        left-margin-size
@@ -3218,10 +3218,10 @@ If SHOW-VERSION is non-nil, show the version in the 
echo area."
                   'company-scrollbar-fg
                 'company-scrollbar-bg)))
 
-(defun company--scrollpos-line (text width)
+(defun company--scrollpos-line (text width right-margin-width)
   (propertize (concat (company-space-string company-tooltip-margin)
                       (company-safe-substring text 0 width)
-                      (company-space-string company-tooltip-margin))
+                      (company-space-string right-margin-width))
               'face 'company-tooltip))
 
 ;; show

Reply via email to