mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
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:
parent
4801816357
commit
1e20948d83
1 changed files with 2 additions and 1 deletions
|
|
@ -1895,13 +1895,14 @@ int tty_connect(void)
|
||||||
default:
|
default:
|
||||||
if (line_index < BUFSIZ)
|
if (line_index < BUFSIZ)
|
||||||
{
|
{
|
||||||
|
optional_local_echo(input_char);
|
||||||
line_buffer[line_index++] = input_char;
|
line_buffer[line_index++] = input_char;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tio_error_print("Input exceeds maximum line length. Truncating.");
|
tio_error_print("Input exceeds maximum line length. Truncating.");
|
||||||
forward = false;
|
|
||||||
}
|
}
|
||||||
|
forward = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save 2 latest stdin input characters
|
// Save 2 latest stdin input characters
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue