diff --git a/src/bz-search-page.c b/src/bz-search-page.c index 76c89407..7fb78803 100644 --- a/src/bz-search-page.c +++ b/src/bz-search-page.c @@ -305,10 +305,20 @@ static void search_changed (BzSearchPage *self, GtkEditable *editable) { + const char *text = NULL; + + text = gtk_editable_get_text (editable); + g_clear_handle_id (&self->search_update_timeout, g_source_remove); - self->search_update_timeout = g_timeout_add_once ( - 300, (GSourceOnceFunc) update_filter, self); - bz_search_bar_set_busy (BZ_SEARCH_BAR (editable), TRUE); + + if (text == NULL || *text == '\0') + update_filter (self); + else + { + self->search_update_timeout = g_timeout_add_once ( + 300, (GSourceOnceFunc) update_filter, self); + bz_search_bar_set_busy (BZ_SEARCH_BAR (editable), TRUE); + } } static void