From: Richard M. Stallman Date: Fri, 25 Jan 2008 22:57:41 +0000 (+0000) Subject: (read_char): Restore echo_message_buffer after redisplay. X-Git-Tag: emacs-pretest-23.0.90~8405 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94f9b406a79c27dff71194a30995efac3a9510fd;p=emacs.git (read_char): Restore echo_message_buffer after redisplay. --- diff --git a/src/keyboard.c b/src/keyboard.c index 4d31c9e01b8..2187c22bdb7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2704,6 +2704,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) /* 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 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) 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.