aboutsummaryrefslogtreecommitdiff
path: root/src/console.h
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-09-02 15:03:33 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-09-02 15:54:50 +0100
commit42a15b157827dbd9c981416c8919ce5f5c907331 (patch)
tree31786a1a4bf6e67beced6533b9eb276f8a8ce3d8 /src/console.h
parentb8395af887ec1c3a3adfd8d56baa12caed740172 (diff)
downloadimv-42a15b157827dbd9c981416c8919ce5f5c907331.tar.gz
console: Use icu to provide proper UTF-8 editing
Diffstat (limited to 'src/console.h')
-rw-r--r--src/console.h4
1 files changed, 4 insertions, 0 deletions
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 <stdbool.h>
+#include <unistd.h>
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);