Mitchell Hashimoto
be3a539152
start working on new resize with reflow, can grow rows
2022-08-07 15:52:53 -07:00
Mitchell Hashimoto
039b640f6b
Merge branch 'reflow'
...
This actually doesn't implement reflow but I wanted to merge this
because it has an important refactor and clarity around screen
operations.
It is now clearly defined in the API what portion of the screen you're
accessing (active, viewport, etc.) and the terminal only operates on the
active area (fixing TODO item in diff).
This is all groundwork I found was necessary to even start thinking
about reflow.
2022-08-07 10:47:27 -07:00
Mitchell Hashimoto
2d6d027097
Screen.region to get a region of contiguous memory for a tag
2022-08-07 10:46:35 -07:00
Mitchell Hashimoto
92602dafca
rowIterator takes the tag type to iterate over
2022-08-07 10:26:04 -07:00
Mitchell Hashimoto
05e0adaa01
screen operations operate on the active area
...
This fixes tons of bugs around escape sequences while scrolling that
used to work on the offset from the viewport (which is wrong). This now
calculates the actual active area and does that. This also fixes the
TODO in the diff.
2022-08-07 09:49:54 -07:00
Mitchell Hashimoto
8ea20f9e41
start changing getRow and rowIndex to use tagged indexes
...
Lots of bugs here, but it MATCHES the bugs!
2022-08-07 09:41:30 -07:00
Mitchell Hashimoto
109e2a67ab
selectionString: realloc so free gets the correct length
2022-08-06 15:50:25 -07:00
Mitchell Hashimoto
9d26ab2dc8
memset zero values when resizing a screen
...
Zig safety checks save us! It was setting undefined values to `0xAA` and
we caught that in a crash. We need to zero this memory.
Practically this happened when `cat`-ing a large file, then attempting
to select and copy any blank trailing space.
2022-08-06 15:44:20 -07:00
Mitchell Hashimoto
dd98768400
note that selectionSlices is tested
2022-08-05 11:40:52 -07:00
Mitchell Hashimoto
d4c4330d4d
copy!
2022-08-05 11:37:02 -07:00
Mitchell Hashimoto
abde2b9e18
way easier way to slice to end of storage duh
2022-08-05 11:21:37 -07:00
Mitchell Hashimoto
ecaca23959
selectionString: test wraparound case, fix bugs
2022-08-05 11:20:53 -07:00
Mitchell Hashimoto
363c51360b
selectionString: more accurate buf allocation
2022-08-05 11:08:56 -07:00
Mitchell Hashimoto
25dc292c14
selectionString unwraps properly
2022-08-05 11:04:41 -07:00
Mitchell Hashimoto
dd76fe124d
terminal.selectionString to grab the string value of a selection
...
This isn't done yet, I still have to handle soft-wrapping and test
wrapped cases in the ring buffer.
2022-08-05 10:57:08 -07:00
Mitchell Hashimoto
974138378b
introducing dedicated point types
2022-08-04 13:04:42 -07:00
Mitchell Hashimoto
dfde2acf10
on resize, make sure we resize the alt screen too
2022-07-22 14:22:53 -07:00
Mitchell Hashimoto
5564bd7213
cursor belongs to screen (prep for alternate screen)
2022-07-22 13:08:40 -07:00
Mitchell Hashimoto
dcc5fe34cf
typing jumps scroll to bottom
2022-07-12 21:07:58 -07:00
Mitchell Hashimoto
45992ff9c9
defining some terms, prepare to have helpers for active vs history
2022-07-11 07:55:10 -07:00
Mitchell Hashimoto
7213bfb14a
disable debug
2022-07-11 07:19:24 -07:00
Mitchell Hashimoto
07d5e3c588
scroll down with no scrollback fixes
2022-07-11 06:53:21 -07:00
Mitchell Hashimoto
f602d09d5d
hook up scrolling, kind of works, kind of broke
2022-07-10 17:04:19 -07:00
Mitchell Hashimoto
67d6114202
can scroll to bottom
2022-07-10 16:30:27 -07:00
Mitchell Hashimoto
a09b87bc9e
scroll with delta no grow
2022-07-10 15:54:32 -07:00
Mitchell Hashimoto
0fc9c956c4
better tests around scrollback
2022-07-10 14:52:35 -07:00
Mitchell Hashimoto
afd47eb10c
start building in "scrolling" of sorts
2022-07-10 14:45:43 -07:00
Mitchell Hashimoto
4cc38e7281
implement auto-wrap, always enabled for now (ignores mode 7)
2022-07-08 17:37:22 -07:00
Mitchell Hashimoto
f53efa633a
initial underline support, can be improved
2022-06-28 14:22:25 -07:00
Mitchell Hashimoto
75b9d1cb84
bold font rendering
2022-06-28 13:44:20 -07:00
Mitchell Hashimoto
e325ea1616
parse more SGR attrs
2022-06-26 17:37:08 -07:00
Mitchell Hashimoto
c5cdc68466
screen resize
2022-05-22 14:45:10 -07:00
Mitchell Hashimoto
9a48d0498d
make erase a bit more efficient
2022-05-21 18:55:55 -07:00
Mitchell Hashimoto
c5fbe439f8
scroll can be a multiple of row count
2022-05-21 18:53:08 -07:00
Mitchell Hashimoto
e5961390d0
screen: fix negative scrolling from zero
2022-05-21 17:44:45 -07:00
Mitchell Hashimoto
656488bff9
fix some bugs
2022-05-21 16:36:19 -07:00
Mitchell Hashimoto
2a657d1ec9
screen: row copy
2022-05-21 16:04:18 -07:00
Mitchell Hashimoto
1a31f8c8be
scrolling in the screen (no scrollback yet)
2022-05-21 15:48:21 -07:00
Mitchell Hashimoto
7de79d1f2b
starting new screen
2022-05-21 10:38:19 -07:00