mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Clean up script run interaction text
This commit is contained in:
parent
be4fc0908f
commit
8f77ad5830
4 changed files with 13 additions and 6 deletions
11
src/tty.c
11
src/tty.c
|
|
@ -1020,9 +1020,15 @@ void handle_command_sequence(char input_char, char *output_char, bool *forward)
|
|||
tio_printf("Run Lua script")
|
||||
tio_printf_raw("Enter file name: ");
|
||||
if (tio_readln())
|
||||
{
|
||||
clear_line();
|
||||
script_run(device_fd, line);
|
||||
}
|
||||
else
|
||||
{
|
||||
clear_line();
|
||||
script_run(device_fd, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_SHIFT_R:
|
||||
|
|
@ -2201,11 +2207,6 @@ void forward_to_tty(int fd, char output_char)
|
|||
}
|
||||
}
|
||||
|
||||
static void clear_line()
|
||||
{
|
||||
print("\r\033[K");
|
||||
}
|
||||
|
||||
static void print_line(const char *string, int cursor_pos)
|
||||
{
|
||||
clear_line();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue