Subject: Re: bug#62427: tab-bar-new-tab-to now handles cases with multiple side-windows

From: martin rudalics <[email-masked]>
Date: Thu, 18 May 2023 10:31:13 +0200

> Would it be possible to update 'minibuf_selected_window'
 > with a new window after deleting the original window?

Not really.  We'd change existing behavior that might rely on the fact
that 'minibuffer-selected-window' returns nil once it got deleted.

Besides, it might not make you happy anyway.  With the default of
'minibuffer-follows-selected-frame', a user may correspond with a
minibuffer window that resides on another frame than that returned by
'minibuffer-selected-window' and neither minibuf_selected_window nor
Vminibuf_scroll_window may make sense any more in such context.

Why don't you use 'get-mru-window' on the frame that owns the
'minibuffer-window' instead of 'minibuffer-selected-window'?

martin