[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3d4e87c 11/31: company: company--company-command-p: Fix lo
From: |
Dmitry Gutov |
Subject: |
[elpa] master 3d4e87c 11/31: company: company--company-command-p: Fix lookup-key |
Date: |
Sun, 14 Apr 2019 22:06:16 -0400 (EDT) |
branch: master
commit 3d4e87cf610c0e48ef219fa87c417af4ee8e056b
Author: Nikita Leshenko <address@hidden>
Commit: Nikita Leshenko <address@hidden>
company: company--company-command-p: Fix lookup-key
Make sure it returns an actual command.
`lookup-key' returns a number when the key sequence is longer than 1 but it
isn't a valid sequence of prefix characters. The number evaluates to true
but
the key isn't in the keymap.
When that happens the completion gets lost. To reproduce, complete a
variable
name and type C-x C-s to save.
Fixes #857
Reported-by: Thomas Fini Hansen <https://github.com/xendk>
---
company.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/company.el b/company.el
index 7b2dd5e..3c13b7b 100644
--- a/company.el
+++ b/company.el
@@ -832,7 +832,7 @@ means that `company-mode' is always turned on except in
`message-mode' buffers."
(defun company--company-command-p (keys)
"Checks if the keys are part of company's overriding keymap"
(or (equal [company-dummy-event] keys)
- (lookup-key company-my-keymap keys)))
+ (commandp (lookup-key company-my-keymap keys))))
;; Hack:
;; Emacs calculates the active keymaps before reading the event. That means we
- [elpa] master 4f2d27e 02/31: Avoid using company-preview-frontend when it'll be invisible, (continued)
- [elpa] master 4f2d27e 02/31: Avoid using company-preview-frontend when it'll be invisible, Dmitry Gutov, 2019/04/14
- [elpa] master 201577c 01/31: Begin completion on a unique match if the user really wants that, Dmitry Gutov, 2019/04/14
- [elpa] master efb76d3 06/31: Add a couple of tests for 'unique' behavior, Dmitry Gutov, 2019/04/14
- [elpa] master e5408b5 07/31: Add a clarifying message, Dmitry Gutov, 2019/04/14
- [elpa] master 8576100 08/31: Add a NEWS entry, Dmitry Gutov, 2019/04/14
- [elpa] master 5d3e689 03/31: Update the remaining callers of company-calculate-candidates, Dmitry Gutov, 2019/04/14
- [elpa] master f53327b 12/31: Merge pull request #858 from nikital/tng-fix-lookup-key, Dmitry Gutov, 2019/04/14
- [elpa] master 3873c4a 05/31: Remove outdated comment, Dmitry Gutov, 2019/04/14
- [elpa] master 04b8171 09/31: Fix a typo, Dmitry Gutov, 2019/04/14
- [elpa] master ebf1301 04/31: Merge branch 'master' into forced-completion-for-unique-match, Dmitry Gutov, 2019/04/14
- [elpa] master 3d4e87c 11/31: company: company--company-command-p: Fix lookup-key,
Dmitry Gutov <=
- [elpa] master b696b39 10/31: Don't run company-completed-started-hook unnecessarily, Dmitry Gutov, 2019/04/14
- [elpa] master a7c689a 14/31: Merge pull request #859 from yqrashawn/customizable-numbers, Dmitry Gutov, 2019/04/14
- [elpa] master 66ed6df 13/31: make numbers after candidates customizable, Dmitry Gutov, 2019/04/14
- [elpa] master 2b671ec 15/31: Move inhibit-redisplay higher, Dmitry Gutov, 2019/04/14
- [elpa] master 5bd5745 24/31: Merge pull request #883 from nikital/tng-document-no-post-completion, Dmitry Gutov, 2019/04/14
- [elpa] master 03fa690 27/31: Merge pull request #886 from cburn11/update-company-clang--completetion-pattern, Dmitry Gutov, 2019/04/14
- [elpa] master 23136d3 28/31: Update copyright years, Dmitry Gutov, 2019/04/14
- [elpa] master 87509b1 19/31: company-complete: Don't change last-command if completion exited, Dmitry Gutov, 2019/04/14
- [elpa] master edbb3c5 16/31: Merge branch 'master' of github.com:company-mode/company-mode, Dmitry Gutov, 2019/04/14
- [elpa] master ebc4fce 17/31: Make company-idle-delay support predicate function, Dmitry Gutov, 2019/04/14