]> code.delx.au - gnu-emacs-elpa/commitdiff
company--create-lines: only reserve width for numbers when they'll be displayed
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 25 Jan 2014 08:18:11 +0000 (10:18 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 25 Jan 2014 08:18:11 +0000 (10:18 +0200)
company.el

index 927c9989d1c1734f7d741eec9591d680fcd04102..8a1610064f958d8bd2eaa5896ec9c2f87daf2685 100644 (file)
@@ -1869,7 +1869,8 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
     (dotimes (_ len)
       (setq width (max (length (pop lines-copy)) width)))
     (setq width (min window-width
-                     (if company-show-numbers
+                     (if (and company-show-numbers
+                              (< company-tooltip-offset 10))
                          (+ 2 width)
                        width)))
     (setq lines-copy lines)