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:
parent
22b4198e45
commit
05d20db147
@ -514,8 +514,9 @@ int Fl_Text_Editor::handle_key() {
|
||||
int del = 0;
|
||||
if (Fl::compose(del)) {
|
||||
if (del) {
|
||||
int dp = insert_position(), di = del;
|
||||
while (di--) dp = buffer()->prev_char_clipped(dp);
|
||||
// del is a number of bytes
|
||||
int dp = insert_position() - del;
|
||||
if ( dp < 0 ) dp = 0;
|
||||
buffer()->select(dp, insert_position());
|
||||
}
|
||||
kill_selection(this);
|
||||
|
||||
@ -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]);*/
|
||||
Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
|
||||
Fl::handle(FL_KEYBOARD, target);
|
||||
Fl::compose_state = [received length];
|
||||
Fl::compose_state = Fl::e_length;
|
||||
fl_unlock_function();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user