File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1366,15 +1366,21 @@ key_release_event(GtkWidget *widget UNUSED,
13661366 * Selection handlers:
13671367 */
13681368
1369+ /* Remember when clip_lose_selection was called from here, we must not call
1370+ * gtk_selection_owner_set() then. */
1371+ static int in_selection_clear_event = FALSE;
1372+
13691373 static gint
13701374selection_clear_event (GtkWidget * widget UNUSED ,
13711375 GdkEventSelection * event ,
13721376 gpointer user_data UNUSED )
13731377{
1378+ in_selection_clear_event = TRUE;
13741379 if (event -> selection == clip_plus .gtk_sel_atom )
13751380 clip_lose_selection (& clip_plus );
13761381 else
13771382 clip_lose_selection (& clip_star );
1383+ in_selection_clear_event = FALSE;
13781384
13791385 return TRUE;
13801386}
@@ -7048,8 +7054,11 @@ clip_mch_request_selection(VimClipboard *cbd)
70487054 void
70497055clip_mch_lose_selection (VimClipboard * cbd UNUSED )
70507056{
7051- gtk_selection_owner_set (NULL , cbd -> gtk_sel_atom , gui .event_time );
7052- gui_mch_update ();
7057+ if (!in_selection_clear_event )
7058+ {
7059+ gtk_selection_owner_set (NULL , cbd -> gtk_sel_atom , gui .event_time );
7060+ gui_mch_update ();
7061+ }
70537062}
70547063
70557064/*
Original file line number Diff line number Diff line change @@ -766,6 +766,8 @@ static char *(features[]) =
766766
767767static int included_patches [] =
768768{ /* Add new patch number below this line */
769+ /**/
770+ 1625 ,
769771/**/
770772 1624 ,
771773/**/
You can’t perform that action at this time.
0 commit comments