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

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

[elpa] externals/corfu 948f7121c7: Check that selected window doesn't ch


From: ELPA Syncer
Subject: [elpa] externals/corfu 948f7121c7: Check that selected window doesn't change during completion (Fix #277)
Date: Fri, 23 Dec 2022 05:57:28 -0500 (EST)

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

    Check that selected window doesn't change during completion (Fix #277)
    
    I am not sure if this change also fixes other edge cases of #112.
---
 corfu.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index bde82e47cf..bfba9c9d0c 100644
--- a/corfu.el
+++ b/corfu.el
@@ -876,9 +876,11 @@ See `corfu-separator' for more details."
 (defun corfu--continue-p ()
   "Continue completion?"
   (pcase-let ((pt (point))
+              (buf (current-buffer))
               (`(,beg ,end . ,_) completion-in-region--data))
     (and beg end
-         (eq (marker-buffer beg) (current-buffer))
+         (eq buf (marker-buffer beg))
+         (eq buf (window-buffer))
          ;; Check ranges
          (<= beg pt end)
          (save-excursion
@@ -1180,7 +1182,7 @@ See `completion-in-region' for the arguments BEG, END, 
TABLE, PRED."
 (defun corfu--auto-tick ()
   "Return the current tick/status of the buffer.
 Auto completion is only performed if the tick did not change."
-  (list (current-buffer) (buffer-chars-modified-tick) (point)))
+  (list (selected-window) (current-buffer) (buffer-chars-modified-tick) 
(point)))
 
 ;;;###autoload
 (define-minor-mode corfu-mode



reply via email to

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