From 42a15b157827dbd9c981416c8919ce5f5c907331 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Mon, 2 Sep 2019 15:03:33 +0100 Subject: console: Use icu to provide proper UTF-8 editing --- src/console.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/console.h') diff --git a/src/console.h b/src/console.h index 22cf9b6..d8d270d 100644 --- a/src/console.h +++ b/src/console.h @@ -2,6 +2,7 @@ #define IMV_CONSOLE #include +#include struct imv_console; @@ -33,6 +34,9 @@ bool imv_console_key(struct imv_console *console, const char *key); /* What is the console prompt's current text? */ const char *imv_console_prompt(struct imv_console *console); +/* What is the console prompt's current cursor position? (bytes into UTF-8 string) */ +size_t imv_console_prompt_cursor(struct imv_console *console); + /* What is the output history of the console? */ const char *imv_console_backlog(struct imv_console *console); -- cgit v1.2.3