tweak(corfu): don't invert evil-complete-all-buffers

And avoid void-variable errors for non-evil users (not that they're
bound for them, but just in case).

Ref: #7748
This commit is contained in:
Henrik Lissner 2024-08-29 01:17:43 -04:00
parent d6a2e24a3e
commit 5311214f90
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -69,7 +69,8 @@ Intended to mimic `evil-complete-next', unless the popup is already open."
(if corfu--candidates
(corfu-next arg)
(require 'cape)
(let ((cape-dabbrev-check-other-buffers (not evil-complete-all-buffers)))
(let ((cape-dabbrev-check-other-buffers
(bound-and-true-p evil-complete-all-buffers)))
(cape-dabbrev t)
(when (> corfu--total 0)
(corfu--goto (or arg 0))))))
@ -83,7 +84,8 @@ Intended to mimic `evil-complete-previous', unless the popup is already open."
(if corfu--candidates
(corfu-previous arg)
(require 'cape)
(let ((cape-dabbrev-check-other-buffers (not evil-complete-all-buffers)))
(let ((cape-dabbrev-check-other-buffers
(bound-and-true-p evil-complete-all-buffers)))
(cape-dabbrev t)
(when (> corfu--total 0)
(corfu--goto (- corfu--total (or arg 1)))))))