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 19:47:19 +0000 |
| commit | 579f3cf8e397bb427098f1bf2bdf3cd2cd19152e (patch) | |
| tree | d0cf731ecba49c3c17a90e8faa48d845986c7da1 | |
| 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 4d6bddf4..fa8ef7a5 100644 --- a/selection.c +++ b/selection.c @@ -1254,7 +1254,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; } |
