Open joseluis opened 1 year ago
hrmmm i thought i looked at this before and concluded it was something to implement in the terminal, not in the termui library. let me take another look...
"concluded it was something to implement in the terminal, not in the termui library"
It's both: The library sends an escape sequence to enable bracked paste mode. When enabled, the terminal adds the bracketed-paste delimiters around pasted text. The library has to recognize and remove the delimiters, and treat the result as literal (quoted) text without any commands. Most relevant for vi-style interfaces, but also for newlines: a newline in pasted text should cause a line-break to be inserted - it should not be treated as an "Enter" or "Accept" action.
It would be nice to support bracketed paste mode.
This is how crossterm implements it: https://docs.rs/crossterm/0.26.0/src/crossterm/event.rs.html#457-497