diff options
author | Richard M. Stallman <rms@gnu.org> | 2008-01-25 22:57:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2008-01-25 22:57:41 +0000 |
commit | d0876372bf65d3a5f3587c687e23703ecf4920fe (patch) | |
tree | a22de26ae1f9d03ebd4a1fccd58026355df0e3a6 /src/keyboard.c | |
parent | d0931883654674a6b2cac969c88477634f030912 (diff) | |
download | emacs-d0876372bf65d3a5f3587c687e23703ecf4920fe.tar.gz |
(read_char): Restore echo_message_buffer after redisplay.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 8 insertions, 0 deletions
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. |