mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 15:46:52 +08:00
Mac OS text input: Fl::compose_state is a number of bytes (not of characters).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -514,8 +514,9 @@ int Fl_Text_Editor::handle_key() {
|
|||||||
int del = 0;
|
int del = 0;
|
||||||
if (Fl::compose(del)) {
|
if (Fl::compose(del)) {
|
||||||
if (del) {
|
if (del) {
|
||||||
int dp = insert_position(), di = del;
|
// del is a number of bytes
|
||||||
while (di--) dp = buffer()->prev_char_clipped(dp);
|
int dp = insert_position() - del;
|
||||||
|
if ( dp < 0 ) dp = 0;
|
||||||
buffer()->select(dp, insert_position());
|
buffer()->select(dp, insert_position());
|
||||||
}
|
}
|
||||||
kill_selection(this);
|
kill_selection(this);
|
||||||
|
|||||||
+1
-1
@@ -1958,7 +1958,7 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
|
|||||||
received, newSelection.location, newSelection.length, Fl::e_length, Fl::compose_state, [received length]);*/
|
received, newSelection.location, newSelection.length, Fl::e_length, Fl::compose_state, [received length]);*/
|
||||||
Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
|
Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
|
||||||
Fl::handle(FL_KEYBOARD, target);
|
Fl::handle(FL_KEYBOARD, target);
|
||||||
Fl::compose_state = [received length];
|
Fl::compose_state = Fl::e_length;
|
||||||
fl_unlock_function();
|
fl_unlock_function();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user