Fix line input mode

Do not forward input characters to tty device before a line is input via
carriage return.
This commit is contained in:
Martin Lund 2024-04-16 19:38:36 +02:00
parent 4801816357
commit 1e20948d83

View file

@ -1895,13 +1895,14 @@ int tty_connect(void)
default:
if (line_index < BUFSIZ)
{
optional_local_echo(input_char);
line_buffer[line_index++] = input_char;
}
else
{
tio_error_print("Input exceeds maximum line length. Truncating.");
forward = false;
}
forward = false;
}
// Save 2 latest stdin input characters