aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-02-14 14:39:09 +0000
committerJim Blandy1993-02-14 14:39:09 +0000
commit832a07261f026605a57c146fb023f8d3cce4fbb7 (patch)
treeb2450575b36739fe355fbebaee0dd2fe869cc8db /src
parent7c1402521d3bc33b9104b0ed1101b3f80fb0ce92 (diff)
downloademacs-832a07261f026605a57c146fb023f8d3cce4fbb7.tar.gz
emacs-832a07261f026605a57c146fb023f8d3cce4fbb7.zip
* dispnew.c (remake_frame_glyphs): When re-allocating the frame's
message buffer when echo_area_glyphs is pointing at it, relocate echo_area_glyphs too. Same for previous_echo_glyphs. * window.h (previous_echo_glyphs): Add extern declaration for this.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c17
-rw-r--r--src/window.h6
2 files changed, 20 insertions, 3 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 2d5259f38df..9ec88d9f45d 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -317,9 +317,20 @@ remake_frame_glyphs (frame)
317 free_frame_glyphs (frame, FRAME_TEMP_GLYPHS (frame)); 317 free_frame_glyphs (frame, FRAME_TEMP_GLYPHS (frame));
318 318
319 if (FRAME_MESSAGE_BUF (frame)) 319 if (FRAME_MESSAGE_BUF (frame))
320 FRAME_MESSAGE_BUF (frame) 320 {
321 = (char *) xrealloc (FRAME_MESSAGE_BUF (frame), 321 /* Reallocate the frame's message buffer; remember that
322 FRAME_WIDTH (frame) + 1); 322 echo_area_glyphs may be pointing here. */
323 char *old_message_buf = FRAME_MESSAGE_BUF (frame);
324
325 FRAME_MESSAGE_BUF (frame)
326 = (char *) xrealloc (FRAME_MESSAGE_BUF (frame),
327 FRAME_WIDTH (frame) + 1);
328
329 if (echo_area_glyphs == old_message_buf)
330 echo_area_glyphs = FRAME_MESSAGE_BUF (frame);
331 if (previous_echo_glyphs == old_message_buf)
332 previous_echo_glyphs = FRAME_MESSAGE_BUF (frame);
333 }
323 else 334 else
324 FRAME_MESSAGE_BUF (frame) 335 FRAME_MESSAGE_BUF (frame)
325 = (char *) xmalloc (FRAME_WIDTH (frame) + 1); 336 = (char *) xmalloc (FRAME_WIDTH (frame) + 1);
diff --git a/src/window.h b/src/window.h
index 51a27157d59..000afe3466b 100644
--- a/src/window.h
+++ b/src/window.h
@@ -225,6 +225,12 @@ extern int minibuf_prompt_width;
225 minibuf_prompt as well as the buffer. */ 225 minibuf_prompt as well as the buffer. */
226extern char *echo_area_glyphs; 226extern char *echo_area_glyphs;
227 227
228/* Value of echo_area_glyphs when it was last acted on.
229 If this is nonzero, there is a message on the frame
230 in the minibuffer and it should be erased as soon
231 as it is no longer requested to appear. */
232extern char *previous_echo_glyphs;
233
228/* Depth in recursive edits. */ 234/* Depth in recursive edits. */
229extern int command_loop_level; 235extern int command_loop_level;
230 236