forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatting: handle XTPUSHSGR/XTPOPSGR sequences
The RawUI's LengthInBufferCells needs to treat VT control sequences as zero-width for the purpose of determining string length. Previously, it only handled SGR (Select Graphics Rendition) sequences (which do things like set fg color, bg color, etc.). I'm currently adding support for some new control sequences in the microsoft/terminal project: XTPUSHSGR and XTPOPSGR. Initial WIP PR [here](microsoft/terminal#1978). Summarized descriptions of XTPUSHSGR and XTPOPSGR from XTerm's [ctlseqs](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html) documentation: ``` CSI # { CSI Ps ; Ps # { Push video attributes onto stack (XTPUSHSGR), xterm. CSI # } Pop video attributes from stack (XTPOPSGR), xterm. Popping restores the video-attributes which were saved using XTPUSHSGR to their previous state. CSI # p CSI Ps ; Ps # p Push video attributes onto stack (XTPUSHSGR), xterm. This is an alias for CSI # {. CSI # q Pop video attributes from stack (XTPOPSGR), xterm. This is an alias for CSI # }. ``` The scenario enabled by these sequences is composability (see [Issue 1796](microsoft/terminal#1796)). I'd like to support these sequences in PowerShell, similarly to SGR sequences, to enable better SGR content composability.
- Loading branch information
1 parent
b768d87
commit 5a09517
Showing
2 changed files
with
75 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters