search: wrap properly.

This commit is contained in:
Alastair Poole 2021-04-08 12:35:55 +01:00
parent 55328b39f7
commit 4d43d50db3
1 changed files with 7 additions and 1 deletions

View File

@ -93,9 +93,11 @@ _search_replace(Entry_Search *search, const char *text, Eina_Bool jump_next)
#endif
}
if ((search->wrap) && (search->prev_find_pos == (pos + initial_pos)))
if ((search->wrap) && (search->prev_find_pos == (pos + initial_pos)))
{
elm_entry_cursor_pos_set(entry, 0);
free(utf8);
return _search_replace(search, text, jump_next);
}
else
{
@ -108,6 +110,10 @@ _search_replace(Entry_Search *search, const char *text, Eina_Bool jump_next)
search->prev_find_pos = pos + initial_pos;
}
}
else if (search->wrap)
{
elm_entry_cursor_pos_set(entry, 0);
}
free(utf8);