# HG changeset patch # User Jim Blandy # Date 729700785 0 # Node ID c5038f47c60221fb7af3da00d2c23f13749793e4 # Parent ad692b76edf45a59962e7fe2f81f9537a2b325b3 * xdisp.c (message): Set echo_frame to the frame whose message buf we want to use, not to the message buf itself. * xdisp.c (message): Use the message buffer of the frame we're going to display the message on to format the message, not that of the selected frame. diff -r ad692b76edf4 -r c5038f47c602 src/xdisp.c --- a/src/xdisp.c Sun Feb 14 14:39:09 1993 +0000 +++ b/src/xdisp.c Sun Feb 14 14:39:45 1993 +0000 @@ -233,36 +233,50 @@ fflush (stderr); } } - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss it. */ - else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame)) + else if (INTERACTIVE) { - if (m) - { - { -#ifdef NO_ARG_ARRAY - int a[3]; - a[0] = a1; - a[1] = a2; - a[2] = a3; + /* The frame whose minibuffer we're going to display the message on. + It may be larger than the selected frame, so we need + to use its buffer, not the selected frame's buffer. */ + FRAME_PTR echo_frame; +#ifdef MULTI_FRAME + choose_minibuf_frame (); + echo_frame = XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window))); +#else + echo_frame = selected_frame; +#endif - doprnt (FRAME_MESSAGE_BUF (selected_frame), - FRAME_WIDTH (selected_frame), m, 0, 3, a); -#else - doprnt (FRAME_MESSAGE_BUF (selected_frame), - FRAME_WIDTH (selected_frame), m, 0, 3, &a1); -#endif /* NO_ARG_ARRAY */ - } + /* A null message buffer means that the frame hasn't really been + initialized yet. Error messages get reported properly by + cmd_error, so this must be just an informative message; toss it. */ + if (FRAME_MESSAGE_BUF (echo_frame)) + { + if (m) + { + { +#ifdef NO_ARG_ARRAY + int a[3]; + a[0] = a1; + a[1] = a2; + a[2] = a3; - message1 (FRAME_MESSAGE_BUF (selected_frame)); + doprnt (FRAME_MESSAGE_BUF (echo_frame), + FRAME_WIDTH (echo_frame), m, 0, 3, a); +#else + doprnt (FRAME_MESSAGE_BUF (echo_frame), + FRAME_WIDTH (echo_frame), m, 0, 3, &a1); +#endif /* NO_ARG_ARRAY */ + } + + message1 (FRAME_MESSAGE_BUF (echo_frame)); + } + else + message1 (0); + + /* Print should start at the beginning of the message + buffer next time. */ + message_buf_print = 0; } - else - message1 (0); - - /* Print should start at the beginning of the message - buffer next time. */ - message_buf_print = 0; } }