mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Fix hex output mode when using normal input mode
In this combination of modes the input character was not forwarded to the tty device. This fix makes sure it is forwarded.
This commit is contained in:
parent
b5184012c4
commit
c3654486c7
1 changed files with 8 additions and 2 deletions
10
src/tty.c
10
src/tty.c
|
|
@ -2232,11 +2232,17 @@ void forward_to_tty(int fd, char output_char)
|
||||||
{
|
{
|
||||||
handle_hex_prompt(output_char);
|
handle_hex_prompt(output_char);
|
||||||
}
|
}
|
||||||
|
else if (option.input_mode == INPUT_MODE_NORMAL)
|
||||||
|
{
|
||||||
|
ssize_t status = tty_write(device_fd, &output_char, 1);
|
||||||
|
if (status < 0)
|
||||||
|
{
|
||||||
|
tio_warning_printf("Could not write to tty device");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if (option.input_mode == INPUT_MODE_NORMAL)
|
|
||||||
{
|
{
|
||||||
optional_local_echo(output_char);
|
optional_local_echo(output_char);
|
||||||
|
tx_total++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue