diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2009-04-15 08:35:28 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2009-04-15 08:35:28 +0000 |
| commit | d3206f01ec18e61e8cd9c7e88b02a6313ab227fa (patch) | |
| tree | ada81f236fbf8b967f5de8d45b39ad23cbd75d7f /src/Fl_Text_Editor.cxx | |
| parent | b214cef3a8d2d9ecf0df7bef7d10dcdfbca4d9d3 (diff) | |
More Fl_Input keyboard fixes / OS X transparency for RGBA data / some utf8 reorganisation
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Editor.cxx')
| -rw-r--r-- | src/Fl_Text_Editor.cxx | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index d70626b75..bd56eeb6c 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -34,26 +34,6 @@ #include <FL/Fl_Text_Editor.H> #include <FL/fl_ask.H> -static int utf_len(char c) -{ - if (!(c & 0x80)) return 1; - if (c & 0x40) { - if (c & 0x20) { - if (c & 0x10) { - if (c & 0x08) { - if (c & 0x04) { - return 6; - } - return 5; - } - return 4; - } - return 3; - } - return 2; - } - return 0; -} /* Keyboard Control Matrix @@ -268,7 +248,7 @@ int Fl_Text_Editor::kf_backspace(int, Fl_Text_Editor* e) { int l = 1; char c = e->buffer()->character(e->insert_position()); if (c & 0x80 && c & 0x40) { - l = utf_len(c); + l = fl_utf8len(c); } e->buffer()->select(e->insert_position(), e->insert_position()+l); } @@ -429,7 +409,7 @@ int Fl_Text_Editor::kf_delete(int, Fl_Text_Editor* e) { int l = 1; char c = e->buffer()->character(e->insert_position()); if (c & 0x80 && c & 0x40) { - l = utf_len(c); + l = fl_utf8len(c); } e->buffer()->select(e->insert_position(), e->insert_position()+l); } |
