* feat: bracketed paste
This introduces support for input via bracketed paste, where escape
characters in the pasted input are not interpreted.
Pasted input are marked as a special field in the KeyMsg. This is
useful because pasted input may need sanitation in individual widgets.
* fix(key): support bracketed paste with short reads
Some terminal emulators feed the bracketed paste data in multiple
chunks, which may not be aligned on a 256 byte boundary. So it's
possible for `input.Read` to return less than 256 bytes read
but while there's still more data to be read to complete a bracketed
paste input.
---------
Co-authored-by: Christian Muehlhaeuser <muesli@gmail.com>
Based on #462 and #452 by @londek, but fixes maintaining the
current visibility state across altscreen state changes.
This makes the behavior consistent across terminals, some of which
keep separate state for altscreen and regular buffer.
Fixes#190.