diff --git a/docs/sequences.md b/docs/sequences.md index 34f8704c6..29f044ea0 100644 --- a/docs/sequences.md +++ b/docs/sequences.md @@ -17,7 +17,7 @@ Status meanings: in the face of it (probably in some broken state). * 💥 - Ghostty crashes if this control sequence is sent. -| Seq | ASCII | Name | Status | +| ID | ASCII | Name | Status | |:---:|:-----:|:-----|:------:| | `ENQ` | `0x05` | [Enquiry](sequences/enq.md) | ✅ | | `BEL` | `0x07` | [Bell](sequences/bel.md) | ❌ | @@ -31,3 +31,12 @@ Status meanings: | `SI` | `0x0F` | [Shift In](#) | ❌ | | `CAN` | `0x18` | [Cancel Parsing](sequences/can.md) | ✅ | | `SUB` | `0x1A` | [Cancel Parsing (Alias)](sequences/can.md) | ✅ | +| `IND` | `ESC D` | [Index](sequences/ind.md) | ✅ | +| `NEL` | `ESC E` | [Next Line](sequences/nel.md) | ✅ | +| `HTS` | `ESC H` | [Horizontal Tab Set](sequences/hts.md) | ✅ | +| `HTS` | `ESC H` | [Horizontal Tab Set](sequences/hts.md) | ✅ | +| `RI` | `ESC M` | [Reverse Index](sequences/ri.md) | ⚠️ | +| `SS2` | `ESC N` | [Single Shift 2](#) | ❌ | +| `SS3` | `ESC O` | [Single Shift 3](#) | ❌ | +| `SPA` | `ESC V` | [Start Protected Area](#) | ❌ | +| `EPA` | `ESC W` | [End Protected Area](#) | ❌ | diff --git a/docs/sequences/hts.md b/docs/sequences/hts.md new file mode 100644 index 000000000..d0e073501 --- /dev/null +++ b/docs/sequences/hts.md @@ -0,0 +1,8 @@ +# Horizontal Tab Set + +| | | +| --- | --- | +| Text | `ESC H` | +| Hex | `0x18 0x48` | + +Mark the current cursor colum as a tab stop. diff --git a/docs/sequences/ind.md b/docs/sequences/ind.md new file mode 100644 index 000000000..2d9182e8b --- /dev/null +++ b/docs/sequences/ind.md @@ -0,0 +1,19 @@ +# Index + +| | | +| --- | --- | +| Text | `ESC D` | +| Hex | `0x18 0x44` | + +Move the cursor to the next line in the scrolling region, scrolling +if necessary. This always unsets the pending wrap state. + +If the cursor is currently outside the scrolling region: + + * move the cursor down one line if it is not on bottom line of the screen. + +If the cursor is inside the scrolling region: + + * If the cursor is on the bottom-most line of the screen: invoke + [scroll up](su.md) with the value `1`. + * Else: move the cursor one line down. diff --git a/docs/sequences/nel.md b/docs/sequences/nel.md new file mode 100644 index 000000000..978fcc10a --- /dev/null +++ b/docs/sequences/nel.md @@ -0,0 +1,8 @@ +# Index + +| | | +| --- | --- | +| Text | `ESC E` | +| Hex | `0x18 0x45` | + +Invoke [carriage return](cr.md) and then [index](ind.md). diff --git a/docs/sequences/ri.md b/docs/sequences/ri.md new file mode 100644 index 000000000..1192ca598 --- /dev/null +++ b/docs/sequences/ri.md @@ -0,0 +1,21 @@ +# Reverse Index + +| | | +| --- | --- | +| Text | `ESC M` | +| Hex | `0x18 0x4D` | + +Reverse [index](ind.md). This unsets the pending wrap state. + +If the cursor is outside of the scrolling region: + + * move the cursor one line up unless it is the top-most line of the screen. + +If the cursor is inside the scrolling region: + + * If the cursor is on the top-most line: invoke [scroll down](#) with value `1` + * Else: move the cursor one line up. + +## TODO + + * Scroll region edge cases