OLD | NEW |
(Empty) | |
| 1 --- src/input.c 2011/02/14 04:59:22 1.154 |
| 2 +++ src/input.c 2011/03/09 05:45:49 1.155 |
| 3 @@ -3004,9 +3004,6 @@ |
| 4 take_action_list (MInputContext *ic, MPlist *action_list) |
| 5 { |
| 6 MInputContextInfo *ic_info = (MInputContextInfo *) ic->info; |
| 7 - MPlist *candidate_list = ic->candidate_list; |
| 8 - int candidate_index = ic->candidate_index; |
| 9 - int candidate_show = ic->candidate_show; |
| 10 MTextProperty *prop; |
| 11 |
| 12 MPLIST_DO (action_list, action_list) |
| 13 @@ -3480,31 +3477,6 @@ |
| 14 }; |
| 15 } |
| 16 } |
| 17 - |
| 18 - if (ic->candidate_list) |
| 19 - { |
| 20 - M17N_OBJECT_UNREF (ic->candidate_list); |
| 21 - ic->candidate_list = NULL; |
| 22 - } |
| 23 - if (ic->cursor_pos > 0 |
| 24 - && (prop = mtext_get_property (ic->preedit, ic->cursor_pos - 1, |
| 25 - Mcandidate_list))) |
| 26 - { |
| 27 - ic->candidate_list = mtext_property_value (prop); |
| 28 - M17N_OBJECT_REF (ic->candidate_list); |
| 29 - ic->candidate_index |
| 30 - = (int) mtext_get_prop (ic->preedit, ic->cursor_pos - 1, |
| 31 - Mcandidate_index); |
| 32 - ic->candidate_from = mtext_property_start (prop); |
| 33 - ic->candidate_to = mtext_property_end (prop); |
| 34 - } |
| 35 - |
| 36 - if (candidate_list != ic->candidate_list) |
| 37 - ic->candidates_changed |= MINPUT_CANDIDATES_LIST_CHANGED; |
| 38 - if (candidate_index != ic->candidate_index) |
| 39 - ic->candidates_changed |= MINPUT_CANDIDATES_INDEX_CHANGED; |
| 40 - if (candidate_show != ic->candidate_show) |
| 41 - ic->candidates_changed |= MINPUT_CANDIDATES_SHOW_CHANGED; |
| 42 return 0; |
| 43 } |
| 44 |
| 45 @@ -3914,7 +3886,37 @@ |
| 46 ic_info->key_unhandled = 0; |
| 47 |
| 48 do { |
| 49 - if (handle_key (ic) < 0) |
| 50 + MPlist *candidate_list = ic->candidate_list; |
| 51 + int candidate_index = ic->candidate_index; |
| 52 + int candidate_show = ic->candidate_show; |
| 53 + MTextProperty *prop; |
| 54 + int result = handle_key (ic); |
| 55 + |
| 56 + if (ic->candidate_list) |
| 57 + { |
| 58 + M17N_OBJECT_UNREF (ic->candidate_list); |
| 59 + ic->candidate_list = NULL; |
| 60 + } |
| 61 + if (ic->cursor_pos > 0 |
| 62 + && (prop = mtext_get_property (ic->preedit, ic->cursor_pos - 1, |
| 63 + Mcandidate_list))) |
| 64 + { |
| 65 + ic->candidate_list = mtext_property_value (prop); |
| 66 + M17N_OBJECT_REF (ic->candidate_list); |
| 67 + ic->candidate_index |
| 68 + = (int) mtext_get_prop (ic->preedit, ic->cursor_pos - 1, |
| 69 + Mcandidate_index); |
| 70 + ic->candidate_from = mtext_property_start (prop); |
| 71 + ic->candidate_to = mtext_property_end (prop); |
| 72 + } |
| 73 + if (candidate_list != ic->candidate_list) |
| 74 + ic->candidates_changed |= MINPUT_CANDIDATES_LIST_CHANGED; |
| 75 + if (candidate_index != ic->candidate_index) |
| 76 + ic->candidates_changed |= MINPUT_CANDIDATES_INDEX_CHANGED; |
| 77 + if (candidate_show != ic->candidate_show) |
| 78 + ic->candidates_changed |= MINPUT_CANDIDATES_SHOW_CHANGED; |
| 79 + |
| 80 + if (result < 0) |
| 81 { |
| 82 /* KEY was not handled. Delete it from the current key sequence. */ |
| 83 if (ic_info->used > 0) |
OLD | NEW |