fix #K4097 - ^C during DECgraphics on tty
For tty, if ^C interrupt occurred while the terminal was displaying VT line drawing characters, it wouldn't finish updating the map and switch back to regular characters, so the "Really quit?" prompt was illegible. Rather than muck about with the signal handler, just add a fixup to tty_putstr() since prompting ultimately uses putstr(WIN_MESSAGE). Reproducing the situation isn't straightforward; I didn't even try.
This commit is contained in:
@@ -2141,6 +2141,9 @@ tty: have <return> dismiss pick-none menus instead of acting like '>' (not
|
||||
tty: menu search via ':' would clobber part of the menu with a status line
|
||||
refresh if the menu was tall enough to cover that
|
||||
tty: add support for petattr
|
||||
tty: if a ^C interrupt occurred while DECgraphics characters were being drawn
|
||||
on the map, the "Really quit?" prompt would be illegible due to being
|
||||
rendered with VT line drawing characters
|
||||
Unix: when user name is used as default character name, keep hyphenated value
|
||||
intact instead stripping off dash and whatever follows as if that
|
||||
specified role/race/&c (worked once upon a time; broken since 3.3.0)
|
||||
|
||||
@@ -2225,6 +2225,16 @@ tty_putstr(winid window, int attr, const char *str)
|
||||
int suppress_history = (attr & ATR_NOHISTORY),
|
||||
urgent_message = (attr & ATR_URGENT);
|
||||
|
||||
#if defined(ASCIIGRAPH) && !defined(NO_TERMS)
|
||||
/* if ^C occurs, player is prompted with "Really quit?" and that
|
||||
prompt is issued via tty_putstr(WIN_MESSAGE); if ^C happens
|
||||
while writing DECgraphics chars, the prompt text would be
|
||||
rendered as VT line-drawing characters unless we do this */
|
||||
if (GFlag) {
|
||||
graph_off();
|
||||
GFlag = FALSE;
|
||||
}
|
||||
#endif
|
||||
/* if message is designated 'urgent' don't suppress it if user has
|
||||
typed ESC at --More-- prompt when dismissing an earlier message;
|
||||
besides turning off WIN_STOP, we need to prevent current message
|
||||
|
||||
Reference in New Issue
Block a user