Clean up script run interaction text

This commit is contained in:
Martin Lund 2024-06-15 15:58:08 +02:00
parent be4fc0908f
commit 8f77ad5830
4 changed files with 13 additions and 6 deletions

View file

@ -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();