# HG changeset patch # User vimboss # Date 1199629027 0 # Node ID 58a14bafc1f08b9712732a26a44c2a93e34e6ae2 # Parent 3c17132458a1538d3f1d6ab00544df8069bd983d updated for version 7.1-209 diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -6660,6 +6660,7 @@ clip_mch_request_selection(VimClipboard unsigned i; int nbytes; char_u *buffer; + time_t start; for (i = 0; i < N_SELECTION_TARGETS; ++i) { @@ -6670,7 +6671,11 @@ clip_mch_request_selection(VimClipboard cbd->gtk_sel_atom, target, (guint32)GDK_CURRENT_TIME); - while (received_selection == RS_NONE) + /* Hack: Wait up to three seconds for the selection. A hang was + * noticed here when using the netrw plugin combined with ":gui" + * during the FocusGained event. */ + start = time(NULL); + while (received_selection == RS_NONE && time(NULL) < start + 3) gtk_main(); /* wait for selection_received_cb */ if (received_selection != RS_FAIL) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 209, +/**/ 208, /**/ 207,