From fbf880b3ba35d2ef6fe0db45e089d03abf4390f1 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sun, 11 Dec 2022 19:15:26 +0100 Subject: Fix region mode predicate --- corfu.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/corfu.el b/corfu.el index 375a65e..9eb9d05 100644 --- a/corfu.el +++ b/corfu.el @@ -1134,7 +1134,9 @@ See `completion-in-region' for the arguments BEG, END, TABLE, PRED." (run-hook-wrapped 'completion-at-point-functions #'corfu--capf-wrapper)) (`(,fun ,beg ,end ,table . ,plist) (let ((completion-in-region-mode-predicate - (lambda () (eq beg (car-safe (funcall fun))))) + (lambda () + (when-let (newbeg (car-safe (funcall fun))) + (= newstart beg)))) (completion-extra-properties plist)) (setq completion-in-region--data (list (if (markerp beg) beg (copy-marker beg)) -- cgit v1.0