diff options
| author | Richard M. Stallman | 2008-01-25 22:57:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2008-01-25 22:57:41 +0000 |
| commit | 94f9b406a79c27dff71194a30995efac3a9510fd (patch) | |
| tree | 3acbbf139ad09c2ec1f0e5d603630c51de49f433 | |
| parent | 2f7a359dddf8eff1830548918d2fdc43211b84a9 (diff) | |
| download | emacs-94f9b406a79c27dff71194a30995efac3a9510fd.tar.gz emacs-94f9b406a79c27dff71194a30995efac3a9510fd.zip | |
(read_char): Restore echo_message_buffer after redisplay.
| -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) | |||
| 2704 | /* if redisplay was requested */ | 2704 | /* if redisplay was requested */ |
| 2705 | if (commandflag >= 0) | 2705 | if (commandflag >= 0) |
| 2706 | { | 2706 | { |
| 2707 | int echo_current = echo_message_buffer == echo_area_buffer[0]; | ||
| 2708 | |||
| 2707 | /* If there is pending input, process any events which are not | 2709 | /* If there is pending input, process any events which are not |
| 2708 | user-visible, such as X selection_request events. */ | 2710 | user-visible, such as X selection_request events. */ |
| 2709 | if (input_pending | 2711 | if (input_pending |
| @@ -2727,6 +2729,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 2727 | swallow_events (0); | 2729 | swallow_events (0); |
| 2728 | /* If that cleared input_pending, try again to redisplay. */ | 2730 | /* If that cleared input_pending, try again to redisplay. */ |
| 2729 | } | 2731 | } |
| 2732 | |||
| 2733 | /* Prevent the redisplay we just did | ||
| 2734 | from messing up echoing of the input after the prompt. */ | ||
| 2735 | if (commandflag == 0 && echo_current) | ||
| 2736 | echo_message_buffer = echo_area_buffer[0]; | ||
| 2737 | |||
| 2730 | } | 2738 | } |
| 2731 | 2739 | ||
| 2732 | /* Message turns off echoing unless more keystrokes turn it on again. | 2740 | /* Message turns off echoing unless more keystrokes turn it on again. |