diff --git a/include/wintty.h b/include/wintty.h index ad7f7ce05..8d272cf56 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -103,6 +103,7 @@ struct DisplayDesc { winid lastwin; /* last window used for I/O */ char dismiss_more; /* extra character accepted at --More-- */ int topl_utf8; /* non-zero if utf8 in str */ + int mixed; /* we are processing mixed output */ }; #endif /* WINDOW_STRUCTS */ diff --git a/win/tty/topl.c b/win/tty/topl.c index 3bc266516..fe7417cfa 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -125,7 +125,7 @@ redotoplin(const char *str) home(); if (!ttyDisplay->topl_utf8) { - if (*str & 0x80) { + if (ttyDisplay->mixed && (*str & 0x80)) { /* kludge for the / command, the only time we ever want a */ /* graphics character on the top line */ g_putch((int) *str++); diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 27f171001..d27d542b9 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -501,6 +501,8 @@ tty_init_nhwindows(int *argcp UNUSED, char **argv UNUSED) ttyDisplay->color = NO_COLOR; #endif ttyDisplay->attrs = 0; + ttyDisplay->topl_utf8 = 0; + ttyDisplay->mixed = 0; /* set up the default windows */ BASE_WINDOW = tty_create_nhwindow(NHW_BASE); @@ -3746,6 +3748,7 @@ tty_putmixed(winid window, int attr, const char *str) tty_raw_print(str); return; } + ttyDisplay->mixed = 1; #ifdef ENHANCED_SYMBOLS if ((windowprocs.wincap2 & WC2_U_UTF8STR) && SYMHANDLING(H_UTF8)) { mixed_to_utf8(buf, sizeof buf, str, &utf8flag); @@ -3757,6 +3760,7 @@ tty_putmixed(winid window, int attr, const char *str) /* now send it to the normal tty_putstr */ tty_putstr(window, attr, buf); ttyDisplay->topl_utf8 = 0; + ttyDisplay->mixed = 0; } /*