[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5416896d608: Promptly disable 'completion-in-region-mode' (bug#67
From: |
Juri Linkov |
Subject: |
master 5416896d608: Promptly disable 'completion-in-region-mode' (bug#67001) |
Date: |
Thu, 9 Nov 2023 02:41:51 -0500 (EST) |
branch: master
commit 5416896d608b68a969977f91b8de1e613300421d
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Juri Linkov <juri@linkov.net>
Promptly disable 'completion-in-region-mode' (bug#67001)
Avoid keeping 'completion-in-region-mode' on when exiting
'completion--in-region-1' if the *Completions* buffer isn't shown.
Otherwise, the bindings from 'completion-in-region-mode-map' linger,
notable shadowing other bindings for TAB.
* lisp/minibuffer.el (completion--in-region-1): Disable
'completion-in-region-mode' if the *Completions* buffer isn't visible.
---
lisp/minibuffer.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index bf1e014319e..d84e92fc013 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1561,11 +1561,12 @@ scroll the window of possible completions."
(t (prog1 (pcase (completion--do-completion beg end)
(#b000 nil)
(_ t))
- (when (and (eq completion-auto-select t)
- (window-live-p minibuffer-scroll-window)
- (eq t (frame-visible-p (window-frame
minibuffer-scroll-window))))
- ;; When the completion list window was displayed, select it.
- (switch-to-completions))))))
+ (if (window-live-p minibuffer-scroll-window)
+ (and (eq completion-auto-select t)
+ (eq t (frame-visible-p (window-frame
minibuffer-scroll-window)))
+ ;; When the completion list window was displayed, select it.
+ (switch-to-completions))
+ (completion-in-region-mode -1))))))
(defun completion--cache-all-sorted-completions (beg end comps)
(add-hook 'after-change-functions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5416896d608: Promptly disable 'completion-in-region-mode' (bug#67001),
Juri Linkov <=