summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/input.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/input.cxx b/test/input.cxx
index 8fb9f214f..17534c812 100644
--- a/test/input.cxx
+++ b/test/input.cxx
@@ -52,6 +52,10 @@ void toggle_cb(Fl_Widget *o, long v) {
void test(Fl_Input *i) {
if (i->changed()) {
i->clear_changed(); printf("%s '%s'\n",i->label(),i->value());
+ char utf8buf[10];
+ int last = fl_utf8encode(i->index(i->position()), utf8buf);
+ utf8buf[last] = 0;
+ printf("Symbol at cursor position: %s\n", utf8buf);
}
}