Cleanup: simplify checks for IME event types
Use a separate block for IME start/event/end for clarity.
This commit is contained in:
@@ -4021,13 +4021,15 @@ static void ui_do_but_textedit(
|
||||
}
|
||||
|
||||
#ifdef WITH_INPUT_IME
|
||||
if (ELEM(event->type, WM_IME_COMPOSITE_START, WM_IME_COMPOSITE_EVENT)) {
|
||||
if (event->type == WM_IME_COMPOSITE_START) {
|
||||
changed = true;
|
||||
|
||||
if (event->type == WM_IME_COMPOSITE_START && but->selend > but->selsta) {
|
||||
if (but->selend > but->selsta) {
|
||||
ui_textedit_delete_selection(but, data);
|
||||
}
|
||||
if (event->type == WM_IME_COMPOSITE_EVENT && ime_data->result_len) {
|
||||
}
|
||||
else if (event->type == WM_IME_COMPOSITE_EVENT) {
|
||||
changed = true;
|
||||
if (ime_data->result_len) {
|
||||
if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER) &&
|
||||
STREQ(ime_data->str_result, "\xE3\x80\x82"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user