[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 03/16: company-pseudo-tooltip-frontend: Small rewrite
From: |
Dmitry Gutov |
Subject: |
[elpa] 03/16: company-pseudo-tooltip-frontend: Small rewrite |
Date: |
Sat, 26 Jul 2014 04:53:19 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit e5cb0c088199671b2fee598cad3b751b99673104
Author: Dmitry Gutov <address@hidden>
Date: Mon Jul 14 06:32:03 2014 +0300
company-pseudo-tooltip-frontend: Small rewrite
---
company.el | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/company.el b/company.el
index 8049e37..9e44c77 100644
--- a/company.el
+++ b/company.el
@@ -2435,20 +2435,20 @@ Returns a negative number if the tooltip should be
displayed above point."
(cl-case command
(pre-command (company-pseudo-tooltip-hide-temporarily))
(post-command
- (let ((old-height (if (overlayp company-pseudo-tooltip-overlay)
- (overlay-get company-pseudo-tooltip-overlay
- 'company-height)
- 0))
- (new-height (company--pseudo-tooltip-height)))
- (unless (and (>= (* old-height new-height) 0)
- (>= (abs old-height) (abs new-height))
- (equal (company-pseudo-tooltip-guard)
- (overlay-get company-pseudo-tooltip-overlay
- 'company-guard)))
- ;; Redraw needed.
- (company-pseudo-tooltip-show-at-point (point) (length company-prefix))
- (overlay-put company-pseudo-tooltip-overlay
- 'company-guard (company-pseudo-tooltip-guard))))
+ (unless (and
+ (overlayp company-pseudo-tooltip-overlay)
+ (let* ((ov company-pseudo-tooltip-overlay)
+ (old-height (overlay-get ov 'company-height))
+ (new-height (company--pseudo-tooltip-height)))
+ (and
+ (>= (* old-height new-height) 0)
+ (>= (abs old-height) (abs new-height))
+ (equal (company-pseudo-tooltip-guard)
+ (overlay-get ov 'company-guard)))))
+ ;; Redraw needed.
+ (company-pseudo-tooltip-show-at-point (point) (length company-prefix))
+ (overlay-put company-pseudo-tooltip-overlay
+ 'company-guard (company-pseudo-tooltip-guard)))
(company-pseudo-tooltip-unhide))
(hide (company-pseudo-tooltip-hide)
(setq company-tooltip-offset 0))
- [elpa] branch master updated (68ccff3 -> ca001a5), Dmitry Gutov, 2014/07/26
- [elpa] 03/16: company-pseudo-tooltip-frontend: Small rewrite,
Dmitry Gutov <=
- [elpa] 06/16: +1 char, -1 line, Dmitry Gutov, 2014/07/26
- [elpa] 05/16: company-pseudo-tooltip-guard: Stabilize when the popup is displayed up, Dmitry Gutov, 2014/07/26
- [elpa] 09/16: company-sort-by-occurrence: continue search after predicate fails, Dmitry Gutov, 2014/07/26
- [elpa] 07/16: Deprecate setting company-idle-delay to t, Dmitry Gutov, 2014/07/26
- [elpa] 08/16: company-sort-by-occurrence: allow customizing the weighing logic, Dmitry Gutov, 2014/07/26
- [elpa] 11/16: company-css-property-value-regexp: prohibit opening curlies, Dmitry Gutov, 2014/07/26
- [elpa] 13/16: Fix company-occurrence-weight-function, Dmitry Gutov, 2014/07/26
- [elpa] 12/16: company-css-property-values: delete duplicates, Dmitry Gutov, 2014/07/26
- [elpa] 10/16: company-capf: get rid of caching last capf-data, Dmitry Gutov, 2014/07/26
- [elpa] 14/16: Fix tests in batch mode, Dmitry Gutov, 2014/07/26