emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 02/52: Fix #103


From: Dmitry Gutov
Subject: [elpa] 02/52: Fix #103
Date: Tue, 01 Jul 2014 11:53:03 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 9c2eaa9f576a0afa83010dae4d3a57147220bf11
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 25 22:34:14 2014 +0400

    Fix #103
---
 company.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 632b7dc..a9403cd 100644
--- a/company.el
+++ b/company.el
@@ -599,7 +599,9 @@ asynchronous call into synchronous.")
     (define-key keymap "\C-\M-s" 'company-filter-candidates)
     (dotimes (i 10)
       (define-key keymap (vector (+ (aref (kbd "M-0") 0) i))
-        `(lambda () (interactive) (company-complete-number ,i))))
+        `(lambda ()
+           (interactive)
+           (company-complete-number ,(if (zerop i) 10 i)))))
 
     keymap)
   "Keymap that is enabled during an active completion.")
@@ -1790,7 +1792,7 @@ inserted."
 To show the number next to the candidates in some back-ends, enable
 `company-show-numbers'."
   (when (company-manual-begin)
-    (and (< n 1) (> n company-candidates-length)
+    (and (or (< n 1) (> n company-candidates-length))
          (error "No candidate number %d" n))
     (cl-decf n)
     (company-finish (nth n company-candidates))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]