search: Fix to move search position in forward search

Previously, if the searched word was located position 0, then the first
search worked but the next search did not work. Because the search
position was still 0.

Now, the search position moves to the end of the searched word if the
search type is forward.
This commit is contained in:
Jaehyun Cho 2017-03-02 10:14:24 +09:00
parent 3ee3c69707
commit e3df617192
1 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,11 @@ selection_region_anim_cb(void *data)
search_data *sd = data;
enventor_item_select_region_set(sd->it, sd->pos,
(sd->pos + sd->len));
//Move search position to the end of the word if search type is forward
if (sd->forward)
sd->pos += sd->len;
return ECORE_CALLBACK_CANCEL;
}