summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-02-03 15:11:19 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-02-03 15:12:01 +0100
commitda272f8a8ea31b8e676861705f7fa2dc939b6b9c (patch)
tree677127061e2c08f664aad5e2e7a2518c88f2805f
parent08bf27e7e19425afa849ab247f381d5a8bda843d (diff)
Only quit if (= beg end) and not initializing
-rw-r--r--corfu.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/corfu.el b/corfu.el
index 1356825..4e16a26 100644
--- a/corfu.el
+++ b/corfu.el
@@ -246,7 +246,7 @@ The completion backend can override this with
"Scroll position.")
(defvar-local corfu--input nil
- "Cons of last prompt contents and point or t.")
+ "Cons of last prompt contents and point.")
(defvar-local corfu--preview-ov nil
"Current candidate overlay.")
@@ -846,7 +846,8 @@ there hasn't been any input, then quit."
(`(,beg ,end . ,_)
(when (let ((pt (point)))
(and (eq (marker-buffer beg) (current-buffer))
- (< beg end) (<= beg pt end)
+ (<= beg pt end)
+ (or (not corfu--input) (< beg end))
(save-excursion
(goto-char beg)
(<= (line-beginning-position) pt (line-end-position)))