Subject: Re: bug#48409: Text runs away before user can copy it

From: Eli Zaretskii <[email-masked]>
Date: Fri, 14 May 2021 23:13:50 +0300

> Date: Fri, 14 May 2021 22:45:43 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > (defvar minibuffer-inactive-mode-map
> >   (let ((map (make-keymap)))
> >     ...
> >     (define-key map [mouse-1] 'view-echo-area-messages)
> > 
> > But now clicking mouse-1 reports an error.
> 
> It reports an error because it doesn't invoke view-echo-area-messages.
> 
> Alan, this minibuffer-inactive-mode-map thing doesn't seem to work
> with mouse clocks, please take a look.

Alan, is the below the right fix?  The problem is that no one is
setting up the minibuffer in inactive mode until after the first time
the minibuffer is activated.

diff --git a/src/minibuf.c b/src/minibuf.c
index 428998a..9ec93a0 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2297,6 +2297,8 @@ init_minibuf_once_for_pdumper (void)
   minibuf_prompt = Qnil;
   minibuf_save_list = Qnil;
   last_minibuf_string = Qnil;
+  Lisp_Object minibuf = get_minibuffer (0);
+  set_minibuffer_mode (minibuf, 0);
 }
 
 void