diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-02-04 19:35:07 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-02-04 19:35:07 +0200 |
commit | a2d7f3f171386f39a55f73988f94b1f4c94d8a6b (patch) | |
tree | ce96ca2e6b83007496102e0b43643e93254c97bd /src/lread.c | |
parent | 3bf21f52b653a71801d371fcac0fcc862a95ec32 (diff) | |
download | emacs-a2d7f3f171386f39a55f73988f94b1f4c94d8a6b.tar.gz emacs-a2d7f3f171386f39a55f73988f94b1f4c94d8a6b.tar.bz2 emacs-a2d7f3f171386f39a55f73988f94b1f4c94d8a6b.zip |
Avoid overwriting minibuffer prompt by keystrokes echo
* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Call cancel_echoing to make sure the prompt is not obscured by
keystrokes echo. (Bug#46243)
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c index b33a312299f..010194c34ea 100644 --- a/src/lread.c +++ b/src/lread.c @@ -804,7 +804,10 @@ If `inhibit-interaction' is non-nil, this function will signal an barf_if_interaction_inhibited (); if (! NILP (prompt)) - message_with_string ("%s", prompt, 0); + { + cancel_echoing (); + message_with_string ("%s", prompt, 0); + } val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds); return (NILP (val) ? Qnil @@ -839,7 +842,10 @@ If `inhibit-interaction' is non-nil, this function will signal an barf_if_interaction_inhibited (); if (! NILP (prompt)) - message_with_string ("%s", prompt, 0); + { + cancel_echoing (); + message_with_string ("%s", prompt, 0); + } return read_filtered_event (0, 0, 0, ! NILP (inherit_input_method), seconds); } @@ -875,7 +881,10 @@ If `inhibit-interaction' is non-nil, this function will signal an barf_if_interaction_inhibited (); if (! NILP (prompt)) - message_with_string ("%s", prompt, 0); + { + cancel_echoing (); + message_with_string ("%s", prompt, 0); + } val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds); |