branch: externals/corfu commit 93804714989158347e70587c11119349bf6cb74c Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
corfu--auto-complete: Guard against incompatible capf results Legacy capfs? --- corfu.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/corfu.el b/corfu.el index b987edb..58e3c5a 100644 --- a/corfu.el +++ b/corfu.el @@ -917,7 +917,9 @@ completion began less than that number of seconds ago." (eq (current-buffer) buffer)) (pcase (run-hook-wrapped 'completion-at-point-functions #'completion--capf-wrapper 'all) - ((and `(,fun ,beg ,end ,table . ,plist) (guard (>= (- end beg) corfu-auto-prefix))) + ((and `(,fun ,beg ,end ,table . ,plist) + (guard (integer-or-marker-p beg)) + (guard (>= (- end beg) corfu-auto-prefix))) (let ((completion-extra-properties plist) (completion-in-region-mode-predicate (if corfu-quit-at-boundary