summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui_gtk_x11.c13
-rw-r--r--src/version.c2
2 files changed, 13 insertions, 2 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 2f88c2eeba..bb679bd975 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1366,15 +1366,21 @@ key_release_event(GtkWidget *widget UNUSED,
* Selection handlers:
*/
+/* Remember when clip_lose_selection was called from here, we must not call
+ * gtk_selection_owner_set() then. */
+static int in_selection_clear_event = FALSE;
+
static gint
selection_clear_event(GtkWidget *widget UNUSED,
GdkEventSelection *event,
gpointer user_data UNUSED)
{
+ in_selection_clear_event = TRUE;
if (event->selection == clip_plus.gtk_sel_atom)
clip_lose_selection(&clip_plus);
else
clip_lose_selection(&clip_star);
+ in_selection_clear_event = FALSE;
return TRUE;
}
@@ -7048,8 +7054,11 @@ clip_mch_request_selection(VimClipboard *cbd)
void
clip_mch_lose_selection(VimClipboard *cbd UNUSED)
{
- gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, gui.event_time);
- gui_mch_update();
+ if (!in_selection_clear_event)
+ {
+ gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, gui.event_time);
+ gui_mch_update();
+ }
}
/*
diff --git a/src/version.c b/src/version.c
index bc0cff309e..3c57f0a545 100644
--- a/src/version.c
+++ b/src/version.c
@@ -767,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1625,
+/**/
1624,
/**/
1623,