471 Commits

Author SHA1 Message Date
Mitchell Hashimoto
7cc0bbe211 terminal: set top and bottom margin tests 2023-10-09 20:08:16 -07:00
Mitchell Hashimoto
0e22e2a8dd terminal: SD should also work if cursor outside of left/right region 2023-10-09 10:53:47 -07:00
Mitchell Hashimoto
fc08f9ab17 terminal: TBC tests 2023-10-09 10:01:23 -07:00
Mitchell Hashimoto
773104d343 terminal: scroll down tests 2023-10-09 09:40:28 -07:00
Mitchell Hashimoto
60f0e9289a terminal: dch xterm audit 2023-10-08 22:16:35 -07:00
Mitchell Hashimoto
1176b65a95 terminal: test IND preserves background sgr 2023-10-08 21:39:29 -07:00
Mitchell Hashimoto
4b9560aa31 terminal: DL 2023-10-08 21:28:41 -07:00
Mitchell Hashimoto
76bbb7c361 terminal: insert lines (IL) handles left/right scroll regions 2023-10-08 20:51:00 -07:00
Mitchell Hashimoto
38f968e368 terminal: IL preserves bg sgr, partial left/right margin support 2023-10-08 15:27:09 -07:00
Mitchell Hashimoto
eab390344a terminal: ED xterm audit
Fix multi-cell handling
Test all scenarios
2023-10-08 14:48:06 -07:00
Mitchell Hashimoto
02b134f97e terminal: EL (erase line) xterm audit
Fix multi-cell char handling
Fix bg SGR respecting in non-protected cases
Fix protected attribute logic
2023-10-08 09:03:04 -07:00
Mitchell Hashimoto
fa73fa0de2 terminal: ECH handles protection attributes properly 2023-10-07 22:36:29 -07:00
Mitchell Hashimoto
514071dd87 terminal: ECH tests with bg and multi-cell fix 2023-10-07 22:21:38 -07:00
Mitchell Hashimoto
f5a5de15cc terminal: HPA, VPA 2023-10-07 09:22:13 -07:00
Mitchell Hashimoto
28f6379453 terminal: CUP respects left/right scroll region 2023-10-07 09:17:00 -07:00
Mitchell Hashimoto
c089c37b90 terminal: CUF handles right margin 2023-10-07 08:42:08 -07:00
Mitchell Hashimoto
9b7c778e55 terminal: cursor up respects scroll margins 2023-10-06 22:41:40 -07:00
Mitchell Hashimoto
78d69c6cdb website: ich split multi-cell 2023-10-06 22:23:08 -07:00
Mitchell Hashimoto
0645ab7a98 terminal: ICH handles left/right margins, clears bg 2023-10-06 22:08:21 -07:00
Mitchell Hashimoto
e4b844dea6 terminal: CHT 2023-10-06 16:58:48 -07:00
Mitchell Hashimoto
cf01cd87a4 terminal: CBT respects left margin in origin mode 2023-10-06 15:48:05 -07:00
Mitchell Hashimoto
6958978a6c terminal: IND supports left/right margins 2023-10-06 14:54:40 -07:00
Mitchell Hashimoto
ec854a20eb terminal: a lot more index tests 2023-10-06 14:33:02 -07:00
Mitchell Hashimoto
eeecc6c7e7 terminal: cursor down respects bottom margins 2023-10-06 12:54:02 -07:00
Mitchell Hashimoto
3360a88768 terminal: implement origin mode and left margin handling for CR 2023-10-06 11:37:50 -07:00
Mitchell Hashimoto
e3b455444d terminal: have left/right scrolling region data but can't be set yet 2023-10-06 11:28:20 -07:00
Mitchell Hashimoto
f32ae27660 terminal: add todo for CUB for left/right margins 2023-10-06 09:27:02 -07:00
Mitchell Hashimoto
d3483a8eed terminal: extended reverse wrap takes priority over reverse wrap 2023-10-06 08:59:22 -07:00
Mitchell Hashimoto
a1becf73ad terminal: CUB extended reverse wrap mode 2023-10-06 08:55:09 -07:00
Mitchell Hashimoto
9e506ac7e1 terminal: cursor back handles reverse wrap (mode 45) 2023-10-06 08:35:02 -07:00
Mitchell Hashimoto
7fe1a61ae8 terminal: cursor back should reduce count if pending wrap is one 2023-10-06 07:52:15 -07:00
Mitchell Hashimoto
5f96adb993 terminal: mode 2027 2023-10-02 09:34:43 -07:00
Mitchell Hashimoto
3f48a43ba4 terminal: cursors must set pending wrap 2023-09-25 17:42:37 -07:00
Mitchell Hashimoto
2c26071332 terminal: eraseLine resets wrap 2023-09-25 17:32:51 -07:00
Mitchell Hashimoto
1f3138add7 terminal: eraseChars resets wrap 2023-09-25 16:23:29 -07:00
Mitchell Hashimoto
804d252787 terminal: deleteChars resets pending wrap state 2023-09-25 16:21:04 -07:00
Mitchell Hashimoto
27cc8e5529 terminal: insertLines resets wrap 2023-09-25 16:17:22 -07:00
Mitchell Hashimoto
961e836d67 terminal: DL should reset wrap 2023-09-25 16:13:07 -07:00
Tim Culverhouse
5d598e4e33 terminal: only use bg attr when erasing line
Similar to eraseDisplay semantics, erase line should only apply the bg
attr to erased cells.
2023-09-25 16:07:48 -05:00
Mitchell Hashimoto
35f89bd28c terminal: eraseDisplay protected 2023-09-25 11:16:06 -07:00
Mitchell Hashimoto
f1c771615f terminal: eraseLine protected, tests 2023-09-25 10:56:59 -07:00
Mitchell Hashimoto
2a390785f5 terminal: add protected mode flag to cursor pen 2023-09-25 10:56:57 -07:00
Tim Culverhouse
3264e70701 terminal: don't modify pen state when erasing eraseDisplay
Erasing the display should be done with only the background attribute of
the current pen. This is the current behavior but is done by altering
the current pen state. The pen state should remain after erasure. Use a
new pen variable to erase the display to enable retaining the pen state.
Add a test condition.
2023-09-25 12:25:45 -05:00
Tim Culverhouse
b592b069c8 terminal: retain cursor and charset when entering alt screen
The state of the cursor and charset should be retained when entering the
alternate screen.

Fixes: alacritty/save_cursor_alt
2023-09-25 11:42:01 -05:00
Tim Culverhouse
66875206bb terminal: move charset to screen
Each screen (primary and alternate) retains the state of the current
charset when DECSC (save cursor) is called. Move the CharsetState into
the screen to enable saving the state with each screen.

Add a test for charset state on screen change
2023-09-25 10:43:39 -05:00
Tim Culverhouse
3d35ae1869 terminal: save charset state and DECOM mode when saving cursor
The charset state and DECOM mode should be saved along with the cursor
state.

Reference: https://vt100.net/docs/vt510-rm/DECSC.html
Fixes: alacritty/saved_cursor
2023-09-24 21:56:48 -05:00
Tim Culverhouse
17ee5c7fd5 terminal: insert a blank cell in insertBlanks
The name sounds obvious, but nothing ever is with ANSI escapes. ICH
(Insert Blank Characters) should insert a cell with no attributes or
colors set.

Remove comment about inserting a space for tests: the tests pass with a
blank cell inserted.

Remove comment about inserted cells having current SGR.

Update tests to check for attribute of inserted cell.
2023-09-24 21:56:48 -05:00
Tim Culverhouse
5f87e09d61 terminal: make deleteChars insert blank cells
When DCH (deleteChars) deletes cells from a line, cells are inserted
from the right. The new cells should not have the current pen style, and
should instead be an empty cell.

Add check for this in the existing test.

Fixes: alacritty/deccolm_reset
2023-09-24 19:12:38 -05:00
Mitchell Hashimoto
056de47b76 terminal: make switch true/false more idiomatic zig 2023-09-22 23:12:46 -07:00
Tim Culverhouse
2051e6bb3a terminal: ensure 'has_bg' is set in eraseDisplay
Add a check for 'has_bg', and if it is set retain the background color.
If it isn't set, we are safe to set the pen to it's default.

Fixes: alacritty/colored_reset
2023-09-23 00:37:59 -05:00