summaryrefslogtreecommitdiff
path: root/src/xselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 293029a042f..28438af226a 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1795,6 +1795,12 @@ DEFUN ("x-store-cut-buffer-internal", Fx_store_cut_buffer_internal,
if (! cut_buffers_initialized) initialize_cut_buffers (display, window);
BLOCK_INPUT;
+
+ /* Don't mess up with an empty value. */
+ if (!bytes_remaining)
+ XChangeProperty (display, window, buffer_atom, XA_STRING, 8,
+ PropModeReplace, data, 0);
+
while (bytes_remaining)
{
int chunk = (bytes_remaining < max_bytes