From f24a8ec1c9fb6812232fb5cfd770830e348fabe0 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sun, 29 Sep 2013 01:24:06 +0200 Subject: [PATCH] Don't observe input change in completion mode. This patch prevents slow and unsmooth completions caused by logic that observes the change content in the inputbox. This was the case mainly for the search completion, every step in the completion list started a new search. --- src/mode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mode.c b/src/mode.c index ae79ad2..a1b2b4d 100644 --- a/src/mode.c +++ b/src/mode.c @@ -137,6 +137,10 @@ void mode_input_changed(GtkTextBuffer* buffer, gpointer data) { char *text; GtkTextIter start, end; + /* don't observe changes in completion mode */ + if (vb.mode->flags & FLAG_COMPLETION) { + return; + } /* don't process changes not typed by the user */ if (gtk_widget_is_focus(vb.gui.input) && vb.mode && vb.mode->input_changed) { gtk_text_buffer_get_bounds(buffer, &start, &end); -- 2.20.1