mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Code cleanup
This commit is contained in:
parent
da04c2c444
commit
2c700a90b0
1 changed files with 13 additions and 13 deletions
26
src/tty.c
26
src/tty.c
|
|
@ -2637,22 +2637,22 @@ int tty_connect(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPUT_MODE_LINE:
|
case INPUT_MODE_LINE:
|
||||||
switch (input_char)
|
if (input_char == '\r')
|
||||||
{
|
{
|
||||||
case '\r': // Carriage return
|
// Carriage return
|
||||||
readline_input(input_char);
|
readline_input(input_char);
|
||||||
|
|
||||||
// Write current line to tty device
|
// Write current line to tty device
|
||||||
char *line = readline_get();
|
char *line = readline_get();
|
||||||
tty_write(device_fd, line, strlen(line));
|
tty_write(device_fd, line, strlen(line));
|
||||||
tty_sync(device_fd);
|
tty_sync(device_fd);
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
readline_input(input_char);
|
|
||||||
forward = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
readline_input(input_char);
|
||||||
|
forward = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue