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 363debc7f0 lineedit: make both ^M and ^J terminate a line.
In protocols other than PROT_RAW, the new line editing system differed
from the old one in not considering ^M or ^J (typed using the actual
Ctrl key, so distinct from pressing Return) to mean "I've finished
editing this line, please send it". This commit reinstates that
behaviour.

It turned out that a third-party tool (namely PuTTY Connection Manager),
which automatically answers prompts for the user, was terminating them
by sending ^J in place of the Return key. We don't know why (and it's
now unmaintained), but it was. So this change should make that tool
start working again.

I exclude PROT_RAW above because in that protocol the line editing has
much weirder handling for ^M and ^J, which lineedit replicated
faithfully from the old code: either control character by itself is
treated literally (displaying as "^M" or "^J" in the terminal), but if
you type the two in sequence in that order, then the ^J deletes the ^M
from the edit buffer and enters the line, so that the sequence CR LF
acts as a newline overall. I haven't changed that behaviour here, but
I have added a regression test of it to test_lineedit.
2024-12-15 19:23:21 +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 lineedit: make both ^M and ^J terminate a line. 2024-12-15 19:23:21 +00:00
terminal.c Fix assertion failure on Restart Session. 2024-12-14 11:48:10 +00:00
terminal.h Fix comment about LE_EOF_ALWAYS. 2024-11-24 12:37:31 +00:00