changeset 87978:6116c13fed46

(read_char): Restore echo_message_buffer after redisplay.
author Richard M. Stallman <rms@gnu.org>
date Fri, 25 Jan 2008 22:57:41 +0000
parents 0f04103be3bf
children 0e3f39950e69
files src/keyboard.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Fri Jan 25 22:56:30 2008 +0000
+++ b/src/keyboard.c	Fri Jan 25 22:57:41 2008 +0000
@@ -2704,6 +2704,8 @@
   /* if redisplay was requested */
   if (commandflag >= 0)
     {
+      int echo_current = echo_message_buffer == echo_area_buffer[0];
+
 	/* If there is pending input, process any events which are not
 	   user-visible, such as X selection_request events.  */
       if (input_pending
@@ -2727,6 +2729,12 @@
 	  swallow_events (0);
 	  /* If that cleared input_pending, try again to redisplay.  */
 	}
+
+      /* Prevent the redisplay we just did
+	 from messing up echoing of the input after the prompt.  */
+      if (commandflag == 0 && echo_current)
+	echo_message_buffer = echo_area_buffer[0];
+
     }
 
   /* Message turns off echoing unless more keystrokes turn it on again.