summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--corfu.el4
1 files changed, 3 insertions, 1 deletions
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))