Prevent echo area help message from being printed repeatedly

* src/keyboard.c (echo_dash): Detect echo_keystrokes_help
messages and return if they be present.
This commit is contained in:
Po Lu
2024-02-08 10:32:28 +08:00
parent 1f9781ee78
commit ed2450e79b

View File

@@ -580,7 +580,10 @@ echo_dash (void)
idx = make_fixnum (SCHARS (KVAR (current_kboard, echo_string)) - 1);
last_char = Faref (KVAR (current_kboard, echo_string), idx);
if (XFIXNUM (last_char) == '-' && XFIXNUM (prev_char) != ' ')
if ((XFIXNUM (last_char) == '-' && XFIXNUM (prev_char) != ' ')
/* Or a keystroke help message. */
|| (echo_keystrokes_help
&& XFIXNUM (last_char) == ')' && XFIXNUM (prev_char) == 'p'))
return;
}