]> git.eshelyaron.com Git - emacs.git/commitdiff
Preserve contents of PRIMARY when sending unsupported drop
authorPo Lu <luangruo@yahoo.com>
Wed, 6 Apr 2022 00:55:30 +0000 (08:55 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 6 Apr 2022 00:57:02 +0000 (08:57 +0800)
* src/xterm.c (x_dnd_send_unsupported_drop): Set local value of
PRIMARY to the preexisting selection value, if any.

src/xterm.c

index 37bbd5d7e1c3360ed9d1cb9462068e3e40ca02d6..926fb9b0482b95863c7b7144fbab818dbae5842e 100644 (file)
@@ -2824,7 +2824,10 @@ x_dnd_send_unsupported_drop (struct x_display_info *dpyinfo, Window target_windo
       root_y = dest_y;
     }
 
-  x_own_selection (QPRIMARY, Qnil, frame);
+  x_own_selection (QPRIMARY,
+                  assq_no_quit (QPRIMARY,
+                                dpyinfo->terminal->Vselection_alist),
+                  frame);
 
   event.xbutton.window = child;
   event.xbutton.x = dest_x;