search entry: Don't propagate handled events

When the text says it has handled the event,
trust it. We don't want to emit ::search-started
if the content hasn't changed, but we still
should not propagate e.g. an Insert key press
if it has already toggled overwrite mode in
the text.

Fixes: #2874
This commit is contained in:
Matthias Clasen
2020-09-09 22:26:27 -04:00
parent 5c67fe0bc2
commit d47d036663

View File

@@ -593,9 +593,9 @@ capture_widget_key_handled (GtkEventControllerKey *controller,
handled = gtk_event_controller_key_forward (controller, entry->entry);
if (handled && entry->content_changed && !entry->search_stopped)
if (handled)
{
if (was_empty)
if (was_empty && entry->content_changed && !entry->search_stopped)
g_signal_emit (entry, signals[SEARCH_STARTED], 0);
return GDK_EVENT_STOP;