From: Ji-hoon Lee Date: Thu, 19 Jan 2017 07:50:52 +0000 (+0900) Subject: Check preedit_text first before analyzing surrounding_text X-Git-Tag: submit/tizen/20170120.050913~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=658b4305b98cb2a6bd7cbce6e9a5ead516f6bfea;p=platform%2Fcore%2Fuifw%2Fisf.git Check preedit_text first before analyzing surrounding_text Since the "cursor_position==0" condition is evaluated first, the immodule considers autocapitalization is required even when imcontext has preedit_text. Thus modified to check the existence of preedit_text first. Change-Id: Ibaa73a68617eaf08b8de6cade0ab8e28c2d83ea4 --- diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 6824950..eb0b1e2 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -448,12 +448,12 @@ analyze_surrounding_text (Ecore_IMF_Context *ctx) break; } - if (imcontext->cursor_position == 0) - return EINA_TRUE; - if (imcontext->preedit_text && strcmp (imcontext->preedit_text, "") != 0) return EINA_FALSE; + if (imcontext->cursor_position == 0) + return EINA_TRUE; + ecore_imf_context_surrounding_get (ctx, &plain_str, &cursor_pos); if (!plain_str) goto done;