[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 13/21: company--continue-failed: require matching input properly
From: |
Dmitry Gutov |
Subject: |
[elpa] 13/21: company--continue-failed: require matching input properly |
Date: |
Mon, 03 Feb 2014 17:36:17 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit d8df9366e687ba51f9d5700806bf87aaa296f411
Author: Dmitry Gutov <address@hidden>
Date: Sat Feb 1 07:33:27 2014 +0200
company--continue-failed: require matching input properly
Even when it breaks prefix.
---
company.el | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/company.el b/company.el
index c3f5b2c..14d92a1 100644
--- a/company.el
+++ b/company.el
@@ -1050,11 +1050,7 @@ Keywords and function definition names are ignored."
company-point)
company-prefix)))
-(defsubst company--string-incremental-p (old-prefix new-prefix)
- (and (> (length new-prefix) (length old-prefix))
- (equal old-prefix (substring new-prefix 0 (length old-prefix)))))
-
-(defun company--continue-failed (new-prefix)
+(defun company--continue-failed ()
(when (company--incremental-p)
(let ((input (buffer-substring-no-properties (point) company-point)))
(cond
@@ -1065,8 +1061,7 @@ Keywords and function definition names are ignored."
(let ((company--auto-completion t))
(company-complete-selection))
nil))
- ((and (company--string-incremental-p company-prefix new-prefix)
- (company-require-match-p))
+ ((company-require-match-p)
;; wrong incremental input, but required match
(delete-char (- (length input)))
(ding)
@@ -1106,7 +1101,7 @@ Keywords and function definition names are ignored."
(setq company-prefix new-prefix)
(company-update-candidates c)
c)
- (t (company--continue-failed new-prefix)))
+ (t (company--continue-failed)))
(company-cancel))))
(defun company--begin-new ()
- [elpa] 15/21: Remove NEWS entry for 9b0d457, it's a bugfix, (continued)
- [elpa] 15/21: Remove NEWS entry for 9b0d457, it's a bugfix, Dmitry Gutov, 2014/02/03
- [elpa] 17/21: company-capf: strip duplicates, Dmitry Gutov, 2014/02/03
- [elpa] 01/21: company-begin-commands: add `org-self-insert-command', Dmitry Gutov, 2014/02/03
- [elpa] 21/21: Merge commit '67ab56a5469f16652e73667ec3b4f76ff6befee6' from company, Dmitry Gutov, 2014/02/03
- [elpa] 16/21: Don't "transform" twice, Dmitry Gutov, 2014/02/03
- [elpa] 20/21: Remove outdated comment, Dmitry Gutov, 2014/02/03
- [elpa] 02/21: Make dabbrev and dabbrev-code more customizable, Dmitry Gutov, 2014/02/03
- [elpa] 19/21: Fix #56, Dmitry Gutov, 2014/02/03
- [elpa] 04/21: Add company-transformers, Dmitry Gutov, 2014/02/03
- [elpa] 14/21: company-sort-by-occurrence: consider the preceding line, Dmitry Gutov, 2014/02/03
- [elpa] 13/21: company--continue-failed: require matching input properly,
Dmitry Gutov <=
- [elpa] 18/21: Display annotations, Dmitry Gutov, 2014/02/03