mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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:
parent
f32b924241
commit
579f3cf8e3
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue