vterm.py: Adds support for bracketed paste mode. Fixes #452 #594
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE, this is a new PR replacing #576 . All the same code, plus automated tests included now.
Please refer to the #576 comment thread for discussion of what's going on here and why.
Checklist
master
orpython-dual-support
branchtox
successfully in local environmentDescription:
Note that bracketed paste mode is NOT automatically enabled for applications; this would cause problems for any apps that aren't bracketed-paste-aware.
There's an example of how to enable it in your urwid application in examples/terminal.py.
Then you need to actually handle the 'paste begin' / 'paste end' key sequences in your application's keypress method. There's no example code for this yet.
For more info on bracketed paste mode, see Wikipedia
or https://cirw.in/blog/bracketed-paste