[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ff9bafc 41/66: Don't idle-begin when company-candidates is
From: |
Dmitry Gutov |
Subject: |
[elpa] master ff9bafc 41/66: Don't idle-begin when company-candidates is non-nil |
Date: |
Tue, 13 Jan 2015 02:44:58 +0000 |
branch: master
commit ff9bafc2628ea0f48c5d682d48985d4b29eceda1
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Don't idle-begin when company-candidates is non-nil
That should prevent bugs like ensime/ensime-server#754 in the future.
---
company.el | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/company.el b/company.el
index e2ba78d..c53d7ae 100644
--- a/company.el
+++ b/company.el
@@ -1136,7 +1136,8 @@ can retrieve meta-data for them."
(cdr c)
(lambda (candidates)
(if (not (and candidates (eq res 'done)))
- ;; Fetcher called us back right away.
+ ;; There's no completions to display,
+ ;; or the fetcher called us back right away.
(setq res candidates)
(setq company-backend backend
company-candidates-cache
@@ -1287,15 +1288,14 @@ from the rest of the back-ends in the group, if any,
will be left at the end."
(not company-candidates)
(let ((company-idle-delay 'now))
(condition-case-unless-debug err
- (company--perform)
+ (progn
+ (company--perform)
+ ;; Return non-nil if active.
+ company-candidates)
(error (message "Company: An error occurred in auto-begin")
(message "%s" (error-message-string err))
(company-cancel))
- (quit (company-cancel)))))
- (unless company-candidates
- (setq company-backend nil))
- ;; Return non-nil if active.
- company-candidates)
+ (quit (company-cancel))))))
(defun company-manual-begin ()
(interactive)
@@ -1303,7 +1303,8 @@ from the rest of the back-ends in the group, if any, will
be left at the end."
(setq company--manual-action t)
(unwind-protect
(let ((company-minimum-prefix-length 0))
- (company-auto-begin))
+ (or company-candidates
+ (company-auto-begin)))
(unless company-candidates
(setq company--manual-action nil))))
@@ -1454,7 +1455,8 @@ from the rest of the back-ends in the group, if any, will
be left at the end."
(defun company--perform ()
(or (and company-candidates (company--continue))
(and (company--should-complete) (company--begin-new)))
- (when company-candidates
+ (if (not company-candidates)
+ (setq company-backend nil)
(setq company-point (point)
company--point-max (point-max))
(company-ensure-emulation-alist)
- [elpa] master 8d4ba7a 38/66: company-preview-show-at-point: Handle the pseudo-tooltip-overlay, (continued)
- [elpa] master 8d4ba7a 38/66: company-preview-show-at-point: Handle the pseudo-tooltip-overlay, Dmitry Gutov, 2015/01/12
- [elpa] master bd5e453 39/66: #267 follow-up fixes, Dmitry Gutov, 2015/01/12
- [elpa] master 7ac956a 37/66: Fix typo, Dmitry Gutov, 2015/01/12
- [elpa] master ccecb37 32/66: Merge pull request #252 from markus1189/bbdb-customize-group, Dmitry Gutov, 2015/01/12
- [elpa] master 6ff5ed3 40/66: Clear out unused variable warnings, Dmitry Gutov, 2015/01/12
- [elpa] master 8b587c0 43/66: Add .elpaignore, Dmitry Gutov, 2015/01/12
- [elpa] master eef07a5 44/66: Support template functions in company-clang annotations, Dmitry Gutov, 2015/01/12
- [elpa] master 80620a1 45/66: Remove ineffective change from c6e9fbad312fc62876d40032a84a94439a055d05, Dmitry Gutov, 2015/01/12
- [elpa] master 829b40f 46/66: company--continue-failed: Don't burp on `stop', Dmitry Gutov, 2015/01/12
- [elpa] master 0a172c5 47/66: company-search-map: Support keypad numbers, Dmitry Gutov, 2015/01/12
- [elpa] master ff9bafc 41/66: Don't idle-begin when company-candidates is non-nil,
Dmitry Gutov <=
- [elpa] master 9335f7b 48/66: company-search-delete-char: New command, Dmitry Gutov, 2015/01/12
- [elpa] master 048a9c4 50/66: company-search-old-map: Remove, unused, Dmitry Gutov, 2015/01/12
- [elpa] master a850cdb 51/66: Privatize some search functions (and a var), Dmitry Gutov, 2015/01/12
- [elpa] master 7b312dd 52/66: Introduce `company-search-toggle-filtering', Dmitry Gutov, 2015/01/12
- [elpa] master 0d2757c 56/66: company-search-map: Add M-n and M-p bindings, Dmitry Gutov, 2015/01/12
- [elpa] master f5942e9 55/66: company-fill-propertize: Don't highlight match beg till common part, Dmitry Gutov, 2015/01/12
- [elpa] master aa7c1ca 57/66: Simplify NEWS entry, Dmitry Gutov, 2015/01/12
- [elpa] master eb1f0db 58/66: Fixup a test, Dmitry Gutov, 2015/01/12
- [elpa] master 9c99c7c 60/66: company-search-abort: Move predicate reset to the mode function, Dmitry Gutov, 2015/01/12
- [elpa] master 31d352f 53/66: Update NEWS.md, Dmitry Gutov, 2015/01/12