summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2009-04-23 15:32:19 +0000
committerMatthias Melcher <fltk@matthiasm.com>2009-04-23 15:32:19 +0000
commit813d295e8a453fccaf5b7acfb55c7c07388bf731 (patch)
tree88227f9c935597cf141e1eec0c808b858264b643 /test
parenta8fdff552b1c59cd2f12541f92c6db249a9fa02e (diff)
Fixed Fl_Input_::index(int) to return a UCS4 character instead of a byte.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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);
}
}