115 Commits

Author SHA1 Message Date
Mitchell Hashimoto
7b750b7ed9 terminal: add dirty bits to the page structure 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
3f16234f72 terminal: Coordinate uses CellCountInt 2024-04-26 20:52:08 -07:00
Mitchell Hashimoto
733ce19654 terminal: handle case where eraseRowBounded happens at top of page
Fixes #1677

If eraseRowBounded is called at the top of a page AND there is a tracked
pin at the top of the page, then we'd have an integer overflow. The test
case covers this and this adds a fix.
2024-04-13 20:45:39 -07:00
Mitchell Hashimoto
dce96847a9 terminal: test eraseRowBounded, fix off by ones 2024-03-27 20:23:45 -07:00
Mitchell Hashimoto
050e6e4daa terminal: when growing rows, need to set rows before grow()
grow() will not prune pages that are needed for the active but that
requires an accurate self.rows. We were setting this too late.
2024-03-27 10:38:31 -07:00
Qwerasd
492e147e26 terminal: clean up some code and comments 2024-03-26 12:07:35 -06:00
Qwerasd
23d32e248e perf(terminal): fast-paths for scrolling regions 2024-03-26 12:07:35 -06:00
Qwerasd
d74ea89056 fastmem: rotateOnce 2024-03-26 12:07:35 -06:00
Qwerasd
ddd7f3e706 comments 2024-03-26 12:07:35 -06:00
Qwerasd
9df9c999a7 fix(terminal): clear erased rows
Clearing these rows is necessary to avoid memory corruption, but the
calls to `clearCells` in the first loop were redundant, since the rows
in question are included in the second loop as well.
2024-03-26 12:07:35 -06:00
Qwerasd
0a6ef3fda4 wip(terminal): Fast path for scroll regions 2024-03-26 12:07:35 -06:00
Mitchell Hashimoto
41720b3c8d terminal: PageList support initialization of multi-page viewports 2024-03-25 11:06:21 -07:00
Mitchell Hashimoto
705bd21055 terminal: PageList trim blanks erases empty pages
Fixes #1605
2024-03-25 10:18:31 -07:00
Mitchell Hashimoto
9ee0b23ef7 terminal: clear spacer heads on growing cols w/o reflow 2024-03-25 09:42:05 -07:00
Mitchell Hashimoto
1b8dc0c0c1 terminal: add a test for resize less cols across pages with cursor 2024-03-24 19:19:23 -07:00
Mitchell Hashimoto
3d6ae29dc3 terminal: when reflowing, set style to default to prevent integrity fail 2024-03-24 15:22:01 -07:00
Mitchell Hashimoto
f719999950 terminal: add assertion to page integrity that row/col count > 0 2024-03-24 14:46:43 -07:00
Mitchell Hashimoto
225cc642b9 terminal: allow growing beyond max size for active area to fit 2024-03-24 09:45:35 -07:00
Mitchell Hashimoto
6cbe699533 terminal: remove problematic test on 4k pages, still working on it 2024-03-23 21:43:16 -07:00
Mitchell Hashimoto
e4332891ee terminal: avoid memory fragmentation if possible on col grow 2024-03-23 21:37:34 -07:00
Mitchell Hashimoto
f848ed2a63 terminal: handle row wrap integrity issues on reflow 2024-03-22 20:28:22 -07:00
Mitchell Hashimoto
2e9cc75206 terminal: add integrity checks throughout PageList 2024-03-22 20:28:22 -07:00
Mitchell Hashimoto
dfa5b2e6fc terminal: pagelist handle scenario where reflow erases all pages 2024-03-22 20:28:16 -07:00
Mitchell Hashimoto
9d826d8837 terminal: add assertion for trackPin as commented 2024-03-22 20:28:15 -07:00
Mitchell Hashimoto
e64d8f5304 terminal: handles eraseRows that erases our full pagelist 2024-03-22 20:28:15 -07:00
Mitchell Hashimoto
1c57bbabda termio/exec: clear screen should erase rows and shift up 2024-03-22 20:28:12 -07:00
Gregory Anders
d54d7cd581 terminal: set PageList viewport to active area when cloned
As an optimization, the renderer does not attempt to find the cell under
the cursor if the viewport is in the scrollback (i.e. not the active
area). When the renderer clones the screen state it also clones the
PageList, and the cloned PageList has its viewport set to the top of the
scrollback.

This caused the renderer to never attempt to find the cell under the
cursor, which in turn caused cells under the cursor to be improperly
highlighted. Instead, when the PageList is cloned initialize its
viewport to the active area.
2024-03-22 20:28:12 -07:00
Mitchell Hashimoto
3f0607d6c0 terminal: PageList rowIterator respects limit row 2024-03-22 20:28:07 -07:00
Mitchell Hashimoto
07a27072dc inspector: needs to call new PageList.maxSize func 2024-03-22 20:28:07 -07:00
Mitchell Hashimoto
e7a2a9bcd1 terminal: resize no reflow must do cols before rows 2024-03-22 20:28:07 -07:00
Mitchell Hashimoto
7e010caea1 terminal: handle resizing into increased implicit max size 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto
e8a2dc5715 terminal: cleaner impl of getTopLeft(.active) 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto
b76995b5af terminal: resizing greater cols without reflow should preserve cols 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto
c8a3040519 terminal: resizing to lt rows should not trim blanks with tracked pin 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto
f0e3516c34 terminal: fix off-by-one tracked pin issues when page is pruned 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto
1ac0980ea0 terminal: pruned pages should keep tracked pins in top-left 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto
e18a77739c terminal: screen lineIterator 2024-03-22 20:28:05 -07:00
Mitchell Hashimoto
c0ed1fa370 terminal: pagelist can adjust grapheme byte capacity 2024-03-22 20:28:02 -07:00
Mitchell Hashimoto
935063d892 core: scroll to selection working 2024-03-22 20:28:01 -07:00
Mitchell Hashimoto
5813304358 terminal: dumpString options 2024-03-22 20:28:00 -07:00
Mitchell Hashimoto
0a6735d05d terminal: jump to prompt 2024-03-22 20:28:00 -07:00
Mitchell Hashimoto
03abde6ba8 terminal: resize handles increased styles/graphemes 2024-03-22 20:27:59 -07:00
Mitchell Hashimoto
9137f52cbf terminal: resize cols without reflow handles higher caps 2024-03-22 20:27:59 -07:00
Mitchell Hashimoto
a2e97a86d0 terminal: PageList adjustCap should start from original cap 2024-03-22 20:27:59 -07:00
Mitchell Hashimoto
ab1a302daa terminal: PageList.clone must use createPageExt for non-std pages 2024-03-22 20:27:59 -07:00
Mitchell Hashimoto
dc04cc1317 terminal: handle style ID overflow 2024-03-22 20:27:59 -07:00
Mitchell Hashimoto
98b16930c3 terminal: PageList adjustCapacity should return new node and fix pins 2024-03-22 20:27:56 -07:00
Mitchell Hashimoto
7ff5577d05 terminal: PageSize adjustCapacity for non-standard pages 2024-03-22 20:27:56 -07:00
Mitchell Hashimoto
4254dc9eef core: single click selection is on the way 2024-03-22 20:27:55 -07:00
Mitchell Hashimoto
3caf6779a5 terminal: PageList resize blank lines at start of page 2024-03-22 20:27:55 -07:00