aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index b6bae978..91523d3b 100644
--- a/selection.c
+++ b/selection.c
@@ -1609,6 +1609,11 @@ fdm_receive_timeout(struct fdm *fdm, int fd, int events, void *data)
static void
fdm_receive_decoder_plain(struct clipboard_receive *ctx, char *data, size_t size)
{
+ /* \r -> \n */
+ for (size_t i = 0; i < size; i++) {
+ if (data[i] == '\r')
+ data[i] = '\n';
+ }
ctx->cb(data, size, ctx->user);
}