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

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

[elpa] master 05a934b 02/23: Simplify


From: Dmitry Gutov
Subject: [elpa] master 05a934b 02/23: Simplify
Date: Fri, 11 Nov 2016 22:21:41 +0000 (UTC)

branch: master
commit 05a934b48512da83aa04d876dbfdcc7fd36791c7
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Simplify
---
 company.el |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/company.el b/company.el
index cb123e0..9ce11a6 100644
--- a/company.el
+++ b/company.el
@@ -2865,17 +2865,11 @@ Returns a negative number if the tooltip should be 
displayed above point."
 (defun company-pseudo-tooltip-unless-just-one-frontend-with-delay (command)
   "`compandy-pseudo-tooltip-frontend', but shown after a delay.
 Delay is determined by `company-tooltip-idle-delay'."
+  (when (and (memq command '(pre-command hide))
+             company-tooltip-timer)
+    (cancel-timer company-tooltip-timer)
+    (setq company-tooltip-timer nil))
   (cl-case command
-    (pre-command
-     (company-pseudo-tooltip-unless-just-one-frontend command)
-     (when company-tooltip-timer
-       (cancel-timer company-tooltip-timer)
-       (setq company-tooltip-timer nil)))
-    (hide
-     (when company-tooltip-timer
-       (cancel-timer company-tooltip-timer)
-       (setq company-tooltip-timer nil))
-     (company-pseudo-tooltip-unless-just-one-frontend command))
     (post-command
      (if (or company-tooltip-timer
              (overlayp company-pseudo-tooltip-overlay))



reply via email to

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