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.
This commit is contained in:
Daniel Eklöf 2021-01-21 15:18:33 +01:00
parent 5168aa72cd
commit b31d0c080b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;
}