emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu b8cd63f 2/6: Add error message when completion is


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu b8cd63f 2/6: Add error message when completion is already in progress
Date: Thu, 29 Apr 2021 13:38:53 -0400 (EDT)

branch: externals/corfu
commit b8cd63f1f85a50789279770c870fe1bcdb26665c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add error message when completion is already in progress
---
 corfu.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/corfu.el b/corfu.el
index d0a3cef..4607719 100644
--- a/corfu.el
+++ b/corfu.el
@@ -641,6 +641,10 @@ Set to nil in order to disable confirmation."
 
 (defun corfu--completion-in-region (&rest args)
   "Corfu completion in region function passing ARGS to 
`completion--in-region'."
+  ;; Prevent restarting the completion. This can happen for example if C-M-/
+  ;; (`dabbrev-completion') is pressed while the Corfu popup is already open.
+  (when completion-in-region-mode
+    (user-error "Completion is already in progress"))
   (let ((completion-show-inline-help)
         (completion-auto-help)
         ;; XXX Disable original predicate check, keep completion alive when



reply via email to

[Prev in Thread] Current Thread [Next in Thread]