Repository metrics
- Stars
- (35,764 stars)
- PR merge metrics
- (平均マージ 27d 19h) (30d で 24 merged PRs)
説明
Description of the new feature/enhancement
With the introduction of bracketed paste mode it is now possible to handle pasting when announcing support via DECSET 2004 (see https://github.com/microsoft/terminal/issues/395), which is great! As a terminal-based user interface application the question now arises how to know which value to restore at the end of the application. This is usually done by using XTSAVE prior to setting bracketed paste mode and then calling XTRESTORE before closing the application or by querying the state of bracketed paste mode via DECRQM (as far as I understand).
Why is this important? Imagine the following:
- Initially Bracketed Paste Mode is Off
- One application is started which supports it and enables it
- At the end of the application the application does not know if bracketed paste was on or off before the application started, so it opts to leave it enabled.
- If the user next starts an application does not support bracketed paste, then the user will start seeing escape sequences
\x1b[200~etc when pasting.
Please add support for either method, so we can leave bracketed paste mode in the same state as it was before the application was started.
Proposed technical implementation details (optional)
XTSAVE and XTRESTORE need to keep a stack of values for the given CSI and either push the current value on the stack or restore the value from the stack and pop.