From 1d48bc59ac140fae3a868d8470933feefa9d41bd Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 30 Nov 2000 01:13:34 +0000 Subject: [PATCH] window_text_find() didn't work correctly with empty find string. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@897 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-windows.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c index 94333620..10247796 100644 --- a/src/fe-text/gui-windows.c +++ b/src/fe-text/gui-windows.c @@ -762,6 +762,11 @@ GList *gui_window_find_text(WINDOW_REC *window, gchar *text, GList *startline, i { LINE_REC *rec = tmp->data; + if (*text == '\0') { + matches = g_list_append(matches, rec); + continue; + } + for (n = 0, ptr = rec->text; ; ptr++) { if (*ptr != 0)