[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master cf89f7c 27/78: Abort dabbrev search on input pending
From: |
Dmitry Gutov |
Subject: |
[elpa] master cf89f7c 27/78: Abort dabbrev search on input pending |
Date: |
Sun, 18 Feb 2018 07:40:18 -0500 (EST) |
branch: master
commit cf89f7c7448e5186235178e5640e504b665c03b2
Author: Aaron Jensen <address@hidden>
Commit: Aaron Jensen <address@hidden>
Abort dabbrev search on input pending
---
company-dabbrev.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/company-dabbrev.el b/company-dabbrev.el
index b1a9def..ecb7feb 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -110,7 +110,8 @@ This variable affects both `company-dabbrev' and
`company-dabbrev-code'."
(goto-char (if pos (1- pos) (point-min)))
;; Search before pos.
(let ((tmp-end (point)))
- (company-dabbrev--time-limit-while (> tmp-end (point-min))
+ (company-dabbrev--time-limit-while (and (not (input-pending-p))
+ (> tmp-end (point-min)))
start limit 1
(ignore-errors
(forward-char -10000))
@@ -119,14 +120,16 @@ This variable affects both `company-dabbrev' and
`company-dabbrev-code'."
;; Before, we used backward search, but it matches non-greedily,
and
;; that forced us to use the "beginning/end of word" anchors in
;; `company-dabbrev--make-regexp'. It's also about 2x slower.
- (while (re-search-forward regexp tmp-end t)
+ (while (and (not (input-pending-p))
+ (re-search-forward regexp tmp-end t))
(if (and ignore-comments (save-match-data
(company-in-string-or-comment)))
(re-search-forward "\\s>\\|\\s!\\|\\s\"" tmp-end t)
(maybe-collect-match))))
(setq tmp-end (point))))
(goto-char (or pos (point-min)))
;; Search after pos.
- (company-dabbrev--time-limit-while (re-search-forward regexp nil t)
+ (company-dabbrev--time-limit-while (and (not (input-pending-p))
+ (re-search-forward regexp nil t))
start limit 25
(if (and ignore-comments (save-match-data
(company-in-string-or-comment)))
(re-search-forward "\\s>\\|\\s!\\|\\s\"" nil t)
- [elpa] master eaddef4 22/78: company-tng: Remove redundant call to overlay-put, (continued)
- [elpa] master eaddef4 22/78: company-tng: Remove redundant call to overlay-put, Dmitry Gutov, 2018/02/18
- [elpa] master 4c1fd0e 16/78: Merge pull request #706 from nikital/company-tng, Dmitry Gutov, 2018/02/18
- [elpa] master 096991d 26/78: Merge pull request #716 from jeffersoncarpenter/master, Dmitry Gutov, 2018/02/18
- [elpa] master 3d9272d 23/78: company-tng: Fully replace default frontend list, Dmitry Gutov, 2018/02/18
- [elpa] master 99fa5a0 30/78: Refine col-row calculation in the presence of line numbering, Dmitry Gutov, 2018/02/18
- [elpa] master 8dea612 39/78: Merge pull request #740 from Havner/master, Dmitry Gutov, 2018/02/18
- [elpa] master a4e14ed 40/78: Add some Commentary, Dmitry Gutov, 2018/02/18
- [elpa] master a574418 46/78: Fix last change, Dmitry Gutov, 2018/02/18
- [elpa] master 4a34571 25/78: Place cursor at correct location for completions, Dmitry Gutov, 2018/02/18
- [elpa] master 78cbc69 32/78: Test in Emacs 25, too, Dmitry Gutov, 2018/02/18
- [elpa] master cf89f7c 27/78: Abort dabbrev search on input pending,
Dmitry Gutov <=
- [elpa] master 1de463a 29/78: company--window-width: Account for display-line-numbers, Dmitry Gutov, 2018/02/18
- [elpa] master 47f3b9b 34/78: Which version?, Dmitry Gutov, 2018/02/18
- [elpa] master 098a907 35/78: Nah, Dmitry Gutov, 2018/02/18
- [elpa] master 27316ec 33/78: Try 'emacs', Dmitry Gutov, 2018/02/18
- [elpa] master 4884a5e 44/78: Fall back to earlier behavior with Clang < 4.0, Dmitry Gutov, 2018/02/18
- [elpa] master 157e8af 55/78: company-etags: Don't set tags-file-name globally, Dmitry Gutov, 2018/02/18
- [elpa] master 3b14294 56/78: Remove dup, Dmitry Gutov, 2018/02/18
- [elpa] master fd9a0fb 53/78: defcustom: prefer t instead of (meaningless) descriptive symbols, Dmitry Gutov, 2018/02/18
- [elpa] master 63ab036 62/78: Clean the annotation string before stripping it, Dmitry Gutov, 2018/02/18
- [elpa] master a870b69 24/78: Merge pull request #712 from nikital/tng-defaults, Dmitry Gutov, 2018/02/18