diff options
author | elfmz <fenix1905@tut.by> | 2022-08-28 13:41:14 +0300 |
---|---|---|
committer | elfmz <fenix1905@tut.by> | 2022-08-28 13:41:14 +0300 |
commit | c63950341be7e88c9f169b96d145dc22701975d8 (patch) | |
tree | 60943eb1c70b1caab4dba047b7cf5d7b62e18234 | |
parent | 890c4d6163b723434bd72afc57c51bfd98586d86 (diff) |
cosmetictty-multiwidth-chars
-rw-r--r-- | WinPort/src/Backend/TTY/TTYBackend.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/WinPort/src/Backend/TTY/TTYBackend.cpp b/WinPort/src/Backend/TTY/TTYBackend.cpp index 3919e175..7c893d83 100644 --- a/WinPort/src/Backend/TTY/TTYBackend.cpp +++ b/WinPort/src/Backend/TTY/TTYBackend.cpp @@ -450,8 +450,6 @@ void TTYBackend::DispatchOutput(TTYOutput &tty_out) if (!_far2l_tty) { // If some characters at line 'special' - like fullwidth or diacric then need // to write whole line til the end to avoid artifacts on non-far2l terminals. - // Also need to do same if previous line had such special characters as they - // could wrap around to next (i.e. current) line. bool unstable_cur = false, unstable_prev = false, modified = false; for (unsigned int x = 0; x < _cur_width; ++x) { if (x + 1 < _cur_width) { @@ -477,8 +475,9 @@ void TTYBackend::DispatchOutput(TTYOutput &tty_out) && (WCHAR_IS_PSEUDOGRAPHIC(prev_line[x].Char.UnicodeChar) || prev_line[x].Char.UnicodeChar < 0x7f); if (cur_simple != prev_simple || x == _cur_width) { tty_out.MoveCursorStrict(y + 1, chunk_x + 1); - WriteLineDebugColored(&cur_line[chunk_x], (x - chunk_x), - FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY); + WriteLineDebugColored(&cur_line[chunk_x], (x - chunk_x), prev_simple + ? FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY + : FOREGROUND_RED | FOREGROUND_INTENSITY); prev_simple = cur_simple; chunk_x = x; } |