1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/terminal
Simon Tatham 069f7c8b21 Fix behaviour of backspace in a 1-column terminal.
This is the first bug found as a direct result of writing that
terminal test program - I added some tests for things I expected to
work already, and some of them didn't, proving immediately that it was
a good idea!

If the terminal is one column wide, and you've printed a
character (hence, set the wrapnext flag), what should backspace do?
Surely it should behave like any other backspace with wrapnext set,
i.e. clear the wrapnext flag, returning the cursor's _logical_
position to the location of the most recently printed character. But
in fact it was anti-wrapping to the previous line, because I'd got the
cases in the wrong order in the if-else chain that forms the backspace
handler. So the handler for 'we're in column 0, wrapping time' was
coming before 'wrapnext is set, just clear it'.

Now wrapnext is checked _first_, before checking anything at all. Any
time we can just clear that, we should.
2023-03-05 10:26:42 +00: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 Update to Unicode 15. 2022-11-11 08:44:07 +00:00
bidi.h Test rig for the new bidi algorithm. 2021-10-10 15:00:30 +01:00
lineedit.c New centralised version of local line editing. 2023-03-04 13:55:50 +00:00
terminal.c Fix behaviour of backspace in a 1-column terminal. 2023-03-05 10:26:42 +00:00
terminal.h Initial work on a terminal test program. 2023-03-05 10:18:50 +00:00