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:
parent
aa31c09fc7
commit
0f1de23d7f
|
@ -418,13 +418,13 @@ insert_text_handler (GtkEditable *editable,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
search_text_entry_changed (GtkEditable *editable,
|
search_text_entry_changed (GtkEditable *editable,
|
||||||
XedSearchbar *searchbar)
|
XedSearchbar *searchbar)
|
||||||
{
|
{
|
||||||
const gchar *search_string;
|
const gchar *search_string;
|
||||||
|
|
||||||
search_string = gtk_entry_get_text (GTK_ENTRY(editable));
|
search_string = gtk_entry_get_text (GTK_ENTRY (editable));
|
||||||
g_return_if_fail(search_string != NULL);
|
g_return_if_fail (search_string != NULL);
|
||||||
|
|
||||||
if (*search_string != '\0')
|
if (*search_string != '\0')
|
||||||
{
|
{
|
||||||
|
@ -434,6 +434,7 @@ search_text_entry_changed (GtkEditable *editable,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
search_buttons_set_sensitive (searchbar, FALSE);
|
search_buttons_set_sensitive (searchbar, FALSE);
|
||||||
|
do_find (searchbar, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue