Modified preedit_commit when preedit string is empty 56/92856/1
authorInHong Han <inhong1.han@samsung.com>
Wed, 19 Oct 2016 06:38:46 +0000 (15:38 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 19 Oct 2016 06:40:04 +0000 (15:40 +0900)
Change-Id: I6e0ca62b98080a6e2822b9987db6184f542faa1f

ism/extras/wayland_immodule/wayland_imcontext.c

index c1ffcc0..55df761 100644 (file)
@@ -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;