netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/ecrire.git/commit/?id=f1169d4cd22f306c00e86cdf6452687c9afa573a

commit f1169d4cd22f306c00e86cdf6452687c9afa573a
Author: Alastair Poole <nets...@gmail.com>
Date:   Thu Apr 8 12:41:24 2021 +0100

    search: guard against infinite recursion.
---
 src/bin/ui/search_dialog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/search_dialog.c b/src/bin/ui/search_dialog.c
index 97c7f32..2315076 100644
--- a/src/bin/ui/search_dialog.c
+++ b/src/bin/ui/search_dialog.c
@@ -93,7 +93,7 @@ _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) && ((pos != search->prev_find_pos) && 
(search->prev_find_pos == (pos + initial_pos))))
           {
              elm_entry_cursor_pos_set(entry, 0);
              free(utf8);

-- 


Reply via email to