Add history and editing feature to line input mode

Use up and down arrow keys to navigate history.

Use left and right arrow keys to move cursor back and forth.

We try mimic the behaviour of GNU readline which we can not use because
we also need to react to key commands.
This commit is contained in:
Martin Lund 2024-06-15 13:37:22 +02:00
parent bed34a0b9a
commit 6ec2ac19d0
3 changed files with 198 additions and 54 deletions

View file

@ -134,6 +134,7 @@ extern char ansi_format[];
#define tio_debug_printf_raw(format, args...)
#endif
void print(const char *format, ...);
void print_hex(char c);
void print_normal(char c);
void print_init_ansi_formatting(void);