refactor: Simplify condition in `evil-collection-company-supported-p`

The complicated condition in `evil-collection-company-supported-p` from the
previous commit got removed in favour of a new condition that check if
`evil-mode` is not active and returns true.
This commit is contained in:
randy1burrell 2021-01-28 22:56:26 -05:00 committed by James N
parent a3aaa508f7
commit 315a750576
1 changed files with 2 additions and 2 deletions

View File

@ -62,9 +62,9 @@ be set through custom or before evil-collection loads."
(defun evil-collection-company-supported-p (command &rest _)
"Return non-nil if `evil-state' is in supported states."
(cond
((not (bound-and-true-p evil-mode)) t)
((eq command 'prefix)
(or (and (bound-and-true-p evil-mode) (memq evil-state evil-collection-company-supported-states))
(not (bound-and-true-p evil-mode))))
(and (bound-and-true-p evil-mode) (memq evil-state evil-collection-company-supported-states)))
(t t)))
;;;###autoload