searchbar: Make sure we clear highlighting when the last character is removed

We need to call do_find() even if we just backspaced the last character out of
the search entry. This ensures all highlighting gets removed from the document.
This commit is contained in:
JosephMcc 2016-11-28 15:07:57 -08:00
parent aa31c09fc7
commit 0f1de23d7f
1 changed files with 4 additions and 3 deletions

View File

@ -423,8 +423,8 @@ search_text_entry_changed (GtkEditable *editable,
{
const gchar *search_string;
search_string = gtk_entry_get_text (GTK_ENTRY(editable));
g_return_if_fail(search_string != NULL);
search_string = gtk_entry_get_text (GTK_ENTRY (editable));
g_return_if_fail (search_string != NULL);
if (*search_string != '\0')
{
@ -434,6 +434,7 @@ search_text_entry_changed (GtkEditable *editable,
else
{
search_buttons_set_sensitive (searchbar, FALSE);
do_find (searchbar, FALSE);
}
}