From: Daniel Carl Date: Wed, 9 Apr 2014 22:47:19 +0000 (+0200) Subject: Show the completion list after the hight was set. X-Git-Url: https://git.owens.tech/assets/static/git-logo.png/assets/static/git-logo.png/git?a=commitdiff_plain;h=8c6ee697fd6d58cd9e1813aa4c1b1061e29a245e;p=vimb.git Show the completion list after the hight was set. If the completion list is displayed before we set the hight, the user might see the list for a really short time covering the whole webview window before it's resized to fit into the lower third of the view. The patch moved the display of the completion list after the list is calculated and the first entry is marked as active. --- diff --git a/src/completion.c b/src/completion.c index 6740284..d01207b 100644 --- a/src/completion.c +++ b/src/completion.c @@ -127,7 +127,6 @@ gboolean completion_create(GtkTreeModel *model, CompletionSelectFunc selfunc, /* this prevents the first item to be placed out of view if the completion * is shown */ - gtk_widget_show_all(comp.win); while (gtk_events_pending()) { gtk_main_iteration(); } @@ -154,6 +153,8 @@ gboolean completion_create(GtkTreeModel *model, CompletionSelectFunc selfunc, comp.active = -1; completion_next(back); + gtk_widget_show_all(comp.win); + return true; }