branch: externals/company
commit df9fa85c5dea7e950dec92a77b79ac712afc02f5
Merge: f56b1e5 ba3e54b
Author: Dmitry Gutov <dgu...@yandex.ru>
Commit: GitHub <nore...@github.com>

    Merge pull request #1114 from yugaego/refactor-numbers-place
    
    Improve readability by minor refactoring
---
 company.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 2dcfd8d..13aaea7 100644
--- a/company.el
+++ b/company.el
@@ -3180,11 +3180,13 @@ If SHOW-VERSION is non-nil, show the version in the 
echo area."
                (right (company-space-string company-tooltip-margin))
                (width width))
           (when company-show-numbers
+            (let ((numbers-place
+                   (gv-ref (if (eq company-show-numbers 'left) left right))))
             (cl-decf width 2)
             (cl-incf numbered)
-            (setf (if (eq company-show-numbers 'left) left right)
+            (setf (gv-deref numbers-place)
                   (concat (funcall company-show-numbers-function numbered)
-                          (if (eq company-show-numbers 'left) left right))))
+                          (gv-deref numbers-place)))))
           (push (concat
                  (company-fill-propertize str annotation
                                           width (equal i selection)

Reply via email to