auto_comp: Reset queue when arrow keys are pressed.

Summary: Reset queue when arrow keys are pressed(when cursor is moved without character input).

Reviewers: Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D1626
This commit is contained in:
Jaehyun Cho 2014-10-31 22:02:08 +09:00 committed by ChunEon Park
parent bf59f2c8da
commit ae90b70c57
1 changed files with 10 additions and 1 deletions

View File

@ -518,7 +518,16 @@ Eina_Bool
autocomp_event_dispatch(const char *key)
{
autocomp_data *ad = g_ad;
if (!ad || !ad->anchor_visible) return EINA_FALSE;
if (!ad) return EINA_FALSE;
//Reset queue.
if (!ad->anchor_visible)
{
if (!strcmp(key, "Up") || !strcmp(key, "Down") || !strcmp(key, "Left") ||
!strcmp(key, "Right"))
queue_reset(ad);
return EINA_FALSE;
}
//Cancel the auto complete.
if (!strcmp(key, "BackSpace"))