osc: 52: treat OSC-52 replies as paste data (after all, they are)

This fixes an issue where other data (such as replies to other
requests) being interleaved with the OSC-52 reply.

The patch piggy backs on the already existing mechanism for handling
regular pastes, where other data is queued up until the paste is done.

There's one corner case that won't work; if the user *just* did a
normal paste (i.e. at virtually the same time the application
requested OSC-52 data), the OSC-52 request will return an empty reply.

Likewise, if there are multiple OSC-52 requests at the same time, only
the first will return data.

Closes #1734
This commit is contained in:
Daniel Eklöf 2024-06-08 08:39:47 +02:00
parent 4bb68282be
commit f3d848da01
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 34 additions and 8 deletions

View file

@ -91,10 +91,13 @@
* Unicode-mode in one foot client affecting other clients, in foot
server mode ([#1717][1717]).
* IME interfering in URL-mode ([#1718][1718]).
* OSC-52 reply interleaved with other data sent to the client
([#1734][1734]).
[1694]: https://codeberg.org/dnkl/foot/issues/1694
[1717]: https://codeberg.org/dnkl/foot/issues/1717
[1718]: https://codeberg.org/dnkl/foot/issues/1718
[1734]: https://codeberg.org/dnkl/foot/issues/1734
### Security