(eq pos (point))
(when (company-auto-begin)
(company-input-noop)
- (company-post-command))))
+ (let ((this-command 'company-idle-begin))
+ (company-post-command)))))
(defun company-auto-begin ()
(and company-mode
(company-uninstall-map))
(defun company-post-command ()
+ (when (null this-command)
+ ;; Happens when the user presses `C-g' while inside
+ ;; `flyspell-post-command-hook', for example.
+ ;; Or any other `post-command-hook' function that can call `sit-for',
+ ;; or any quittable timer function.
+ (company-abort)
+ (setq this-command 'company-abort))
(unless (company-keep this-command)
(condition-case err
(progn