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

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

[ELPA-diffs] [elpa] 08/12: company--create-lines: Clear the old offset w


From: Dmitry Gutov
Subject: [ELPA-diffs] [elpa] 08/12: company--create-lines: Clear the old offset when appropriate
Date: Sat, 25 Jan 2014 11:35:48 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit d05012875f12a74edfa602bbb7093e1195003160
Author: Dmitry Gutov <address@hidden>
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

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