]> code.delx.au - gnu-emacs-elpa/commitdiff
Don't interrupt multi-key command input by starting idle completion.
authorNikolaj Schumacher <git@nschum.de>
Thu, 7 May 2009 07:49:18 +0000 (09:49 +0200)
committerNikolaj Schumacher <git@nschum.de>
Thu, 7 May 2009 13:13:35 +0000 (15:13 +0200)
company.el

index b15022df8fc8e5bc63bc099faaccd48c98405fc5..9d3bfe3014b6a0c843a53760e1ada22b0f190cd3 100644 (file)
@@ -65,6 +65,7 @@
 ;;
 ;;; Change Log:
 ;;
+;;    Idle completion no longer interrupts multi-key command input.
 ;;    Added `company-ropemacs' and `company-pysmell' back-ends.
 ;;
 ;; 2009-04-25 (0.4.2)
@@ -745,6 +746,9 @@ keymap during active completions (`company-active-map'):
 (defun company--should-complete ()
   (and (not (or buffer-read-only overriding-terminal-local-map
                 overriding-local-map))
+       ;; Check if in the middle of entering a key combination.
+       (or (equal (this-command-keys-vector) [])
+           (not (keymapp (key-binding (this-command-keys-vector)))))
        (eq company-idle-delay t)
        (or (eq t company-begin-commands)
            (memq this-command company-begin-commands)