From 8a7daef5b9fa9e6749fac589b11bd5e15e03f77d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 15 Aug 2008 00:30:44 +0000 Subject: [PATCH] (choose-completion): Try reselecting completion-reference-buffer. --- lisp/simple.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 1cf39021321..3e38d59a692 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5612,12 +5612,15 @@ With prefix argument N, move N items (negative N means move backward)." (setq completion (buffer-substring-no-properties beg end)) (let ((owindow (selected-window))) (if (and (one-window-p t 'selected-frame) - (window-dedicated-p (selected-window))) + (window-dedicated-p owindow)) ;; This is a special buffer's frame (iconify-frame (selected-frame)) (or (window-dedicated-p (selected-window)) (bury-buffer))) - (select-window owindow)) + (select-window + (or (and (buffer-live-p buffer) + (get-buffer-window buffer)) + owindow))) (choose-completion-string completion buffer base-size))) ;; Delete the longest partial match for STRING -- 2.39.2