diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-01-21 14:18:33 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-26 18:31:12 +0000 |
| commit | b31d0c080b705f910132fe6b77aff09ff0bddd3e (patch) | |
| tree | b2b605441cd8e4c7aa6715ccd0a258a4f576ac62 | |
| parent | selection: replace \r\n and \n with \r, and strip \e from pasted text (diff) | |
selection: unbreak text/uri-list decoding: we’re not using \r, not \n
Before passing the pasted text to the decoder, we now replace \r\n,
and \n, with \r.
The URI decoder was looking for a \n, which meant we failed to split
up the list and instead pasted a single “multi-line” URI.
| -rw-r--r-- | selection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/selection.c b/selection.c index 57553609..5bf715fe 100644 --- a/selection.c +++ b/selection.c @@ -1559,7 +1559,7 @@ fdm_receive_decoder_uri(struct clipboard_receive *ctx, char *data, size_t size) char *start = ctx->buf.data; char *end = NULL; - while ((end = memchr(start, '\n', ctx->buf.idx - (start - ctx->buf.data))) != NULL) { + while ((end = memchr(start, '\r', ctx->buf.idx - (start - ctx->buf.data))) != NULL) { decode_one_uri(ctx, start, end - start); start = end + 1; } |
