SaveCursorToken
Namespace: Hex1b.Tokens
Assembly: Hex1b.dll
Represents a cursor save command: ESC 7 (DECSC) or ESC [ s (ANSI.SYS)
public sealed record SaveCursorToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<SaveCursorToken>Inheritance
Object → AnsiToken → SaveCursorToken
Implements
Constructors
SaveCursorToken(bool)
Represents a cursor save command: ESC 7 (DECSC) or ESC [ s (ANSI.SYS)
Parameters:
UseDec(Boolean): If true, use DEC format (ESC 7) which also saves character attributes. If false, use ANSI.SYS format (ESC [ s) which only saves cursor position.
public SaveCursorToken(bool UseDec = true)Properties
UseDec
If true, use DEC format (ESC 7) which also saves character attributes. If false, use ANSI.SYS format (ESC [ s) which only saves cursor position.
Returns: Boolean
public bool UseDec { get; init; }Fields
Ansi
Save cursor using ANSI.SYS format (ESC [ s) - saves position only.
Returns: SaveCursorToken
public static readonly SaveCursorToken AnsiDec
Save cursor using DEC format (ESC 7) - saves position and attributes.
Returns: SaveCursorToken
public static readonly SaveCursorToken DecRemarks
Saves the current cursor position (and optionally attributes) for later restoration with .
The DEC format (ESC 7) is more widely supported and also saves: Cursor positionCharacter attributes (SGR)Character setOrigin mode state