completion/company: company-frontends bug fixed upstream

This commit is contained in:
Henrik Lissner 2018-05-10 19:27:14 +02:00
parent ffabd2687b
commit 1ee9a1893f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -58,15 +58,6 @@ MODES should be one major-mode symbol or a list of them."
(def-package! company-box
:when (and EMACS26+ (featurep! +childframe))
:hook (company-mode . company-box-mode)
:init
(defun +company|fix-frontends ()
"Ensure `company-pseudo-tooltip-frontend' is *not* in `company-frontends'
when company-box is active, which are incompatible and cause duplicate popups."
(make-variable-buffer-local 'company-frontends)
(if company-box-mode
(setq company-frontends (delq 'company-pseudo-tooltip-frontend company-frontends))
(cl-pushnew 'company-pseudo-tooltip-frontend company-frontends :test #'eq)))
(add-hook 'company-box-mode-hook #'+company|fix-frontends)
:config
(setq company-box-backends-colors nil
company-box-icons-elisp