From 181689208861e48263304912650a7a4ed4b35cc6 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Wed, 19 Oct 2016 15:38:46 +0900 Subject: [PATCH] Modified preedit_commit when preedit string is empty Change-Id: I6e0ca62b98080a6e2822b9987db6184f542faa1f --- ism/extras/wayland_immodule/wayland_imcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index c1ffcc0..55df761 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -1407,7 +1407,7 @@ text_input_preedit_string(void *data, clear_preedit(imcontext); imcontext->preedit_text = strdup(text); - imcontext->preedit_commit = strdup(commit); + imcontext->preedit_commit = (strlen(text) > 0 ? strdup(commit) : NULL); imcontext->preedit_cursor = utf8_offset_to_characters(text, imcontext->pending_preedit.cursor); imcontext->preedit_attrs = imcontext->pending_preedit.attrs; -- 2.7.4