From bda8f5deec7dcbe35530f4a0b9f00cdec3805449 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 6 Apr 2022 08:55:30 +0800 Subject: [PATCH] Preserve contents of PRIMARY when sending unsupported drop * src/xterm.c (x_dnd_send_unsupported_drop): Set local value of PRIMARY to the preexisting selection value, if any. --- src/xterm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 37bbd5d7e1c..926fb9b0482 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; -- 2.39.5