1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 01:18:00 +00:00
putty-source/terminal
Simon Tatham 15081bb0ad Fix printing double-width char in rightmost column without wrap.
Another bug turned up by writing tests. The code that spots that the
character won't fit, and wraps it to the next line setting
LATTR_WRAPPED2, was not checking that wrap mode was _enabled_ before
doing that. So if you printed a DW character in the rightmost column
while the terminal was in non-auto-wrap mode, you'd get an unwanted
wrap.

Other terminals disagree on what to do here. xterm leaves the cursor
in the same place and doesn't print any character at all.
gnome-terminal, on the other hand, backspaces by a character so that
it _can_ print the requested DW character, in the rightmost _two_
columns.

I think I don't much like either of those, so instead I'm using the
same fallback we use for displaying a DW character when the whole
terminal is only one column wide: if there is physically no room to
print the requested character, turn it into U+FFFD REPLACEMENT
CHARACTER.

(cherry picked from commit ed5bf9b3b8)
2023-04-19 14:28:36 +01:00
..
bidi_gettype.c Make bidi type enums into list macros. 2021-10-10 14:55:15 +01:00
bidi_test.c bidi_test: minor memory fixes. 2022-01-29 18:25:34 +00:00
bidi.c Add a batch of missing 'static's. 2022-09-03 12:02:48 +01:00
bidi.h Test rig for the new bidi algorithm. 2021-10-10 15:00:30 +01:00
terminal.c Fix printing double-width char in rightmost column without wrap. 2023-04-19 14:28:36 +01:00
terminal.h Support xterm any-event mouse tracking 2023-04-19 14:28:34 +01:00