dgutov pushed a commit to branch master
in repository elpa.

commit d05012875f12a74edfa602bbb7093e1195003160
Author: Dmitry Gutov <dgu...@yandex.ru>
Date:   Sat Jan 25 12:47:43 2014 +0200

    company--create-lines: Clear the old offset when appropriate
---
 company.el |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/company.el b/company.el
index 8a16100..1c3ab9e 100644
--- a/company.el
+++ b/company.el
@@ -1841,6 +1841,10 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\" 
\"foobarbaz\"\)\)"
         scrollbar-bounds
         new)
 
+    ;; Maybe clear old offset.
+    (when (<= len (+ company-tooltip-offset limit))
+      (setq company-tooltip-offset 0))
+    (message "offset interm %s" company-tooltip-offset)
     ;; Scroll to offset.
     (if (eq company-tooltip-offset-display 'lines)
         (setq limit (company-tooltip--lines-update-offset selection len limit))

Reply via email to