Commit graph

261 commits

Author SHA1 Message Date
00JCIV00
1e30dd7d31 Fixed main.Key.enter binding 2024-05-12 20:25:51 -05:00
00JCIV00
845a3a6786 Added build step to . 2024-05-12 20:25:51 -05:00
Tim Culverhouse
ca4346e35a window(fill): fix bounds check
The bounds check should terminate at the window height.

Fixes: f7f4606f1d "window(fill): bounds check the memcpy op"
2024-05-12 20:24:31 -05:00
Tim Culverhouse
f7f4606f1d window(fill): bounds check the memcpy op
Bounds check our window before performing any direct buffer access. This
affects clear and fill, and allows a window to technically be out of
bounds, but only the visual portion of the window will be filled.
2024-05-11 06:38:08 -05:00
Tim Culverhouse
cce22e8850 options: allow applications to set requested kitty flags 2024-05-10 19:57:02 -05:00
Tim Culverhouse
972129a764 vaxis: apply quirk for vhs
Apply a quirk when in a vhs recording session. Vaxis will automatically
use `wcwidth` and no kitty keyboard
2024-05-09 20:22:45 -05:00
CJ van den Berg
8819e192cc vaxis: export Parser, Tty and getWinsize for applications that cannot use Loop 2024-05-09 19:14:49 -05:00
CJ van den Berg
cde85103a1 window: add readCell method 2024-05-09 06:20:56 -05:00
Tim Culverhouse
bb5d79ef75 core: implement legacy SGR sequences and fallbacks 2024-05-08 13:59:57 -05:00
Tim Culverhouse
48a8aa509c widgets(text_input): protect against zero-width window
A zero-width window could set the text_input.draw method into an
infinite loop. Explicitly protect against this case.
2024-05-06 19:03:07 -05:00
Tim Culverhouse
920e490e4c widgets: add Scrollbar widget 2024-05-06 18:54:35 -05:00
Tim Culverhouse
fa7d94f3df window(print): use const Segment 2024-05-03 13:58:23 -05:00
Tim Culverhouse
6abfd8fc3f render: skip clearing images if they aren't supported 2024-05-03 13:57:03 -05:00
Tim Culverhouse
0fe1142989 widgets(nvim): fix scroll down 2024-05-03 12:30:04 -05:00
Tim Culverhouse
cbfa56bb1b log: remove cursor log lines 2024-05-03 12:12:01 -05:00
Tim Culverhouse
ed1867cf39 examples(nvim): update example api
The nvim widget needs work, but at least you can run the example
2024-05-02 20:13:45 -05:00
Tim Culverhouse
a0db41f87c render: add cli renderer
Add a renderer for applications running on the primary screen. This
renderer uses relative cursor positioning, and works with all the same
primitives as the alternate screen.

Fix a bug where repositioning was never turned back to false. This was a
nasty one with huge perf implications.

Set internal cells to a space and default on init. This prevents us from
writing them. As a result, we now issue a hardware clear on resize.
2024-05-02 12:50:33 -05:00
Tim Culverhouse
e43f0907ec vaxis: fix InternalScreen.writeCell
writeCell was clearing the retaining capacity of the wrong arraylist
when writing the uri_id.
2024-05-02 10:38:39 -05:00
Tim Culverhouse
852e2d1db3 readme: update zig version 2024-04-30 17:21:39 -05:00
Tim Culverhouse
50242b984b loop: fully clean up tty when stopping event loop
Previously, stopping the read thread would not fully clean up the tty.
This could result in issues such as #9 where the terminal state was
borked upon return to shell or if temporarily exiting the TUI.

Fixes: #9
2024-04-30 16:42:10 -05:00
Tim Culverhouse
2f83b0d6ca update readme 2024-04-30 16:00:23 -05:00
Tim Culverhouse
6d995fe737 color: change eql to switch statement 2024-04-30 13:38:32 -05:00
Tim Culverhouse
2d48093d3a examples(pathological): improve printing of time 2024-04-30 12:57:29 -05:00
Tim Culverhouse
fc9f55d6fa perf: improve perf of fill and Screen.init
Use @memset for initializing and filling a Screen.
2024-04-30 12:33:46 -05:00
Tim Culverhouse
31b97f73d2 tests: fix TextInput test 2024-04-30 09:02:32 -05:00
Tim Culverhouse
5ad01f6a3a image: fix base64 and example 2024-04-30 09:02:16 -05:00
Tim Culverhouse
df2f936317 tty: handle key_release events 2024-04-30 08:55:26 -05:00
Tim Culverhouse
92883f5d42 event: handle key_release events 2024-04-30 08:42:21 -05:00
Tim Culverhouse
cb685f3780 perf: improve equality checks
Improve equality checks during render calls by creating bespoke eql
methods or using std.mem instead of std.meta
2024-04-30 06:50:45 -05:00
forgoty
019669d2f0 Fix examples: main, pathological, table. 2024-04-29 17:51:33 -05:00
Tim Culverhouse
4e3a53c536 widgets(textinput): fix grapheme API 2024-04-29 14:21:03 -05:00
Tim Culverhouse
8a71cd4c85 zg: complete replacement of ziglyph with zg 2024-04-29 14:00:08 -05:00
Tim Culverhouse
9fec6f122b core: replace ziglyph.GraphemeIterator with zg version
ziglyph is being replaced by zg. Replace all calls to ziglyph grapheme
iterator with the zg version
2024-04-29 13:03:01 -05:00
Tim Culverhouse
e7915b5dd7 examples: fix api for main, pathological, table 2024-04-29 12:35:02 -05:00
Tim Culverhouse
41f76e8f03 vaxis: refactor to split Loop and Vaxis
Refactor the main API to split Loop and Vaxis types. This enables the
core Vaxis type to be more easily referenced in other types, since it
doesn't require a comptime type parameter. This will make the switch to
the zg unicode library easier.
2024-04-29 12:26:50 -05:00
Tim Culverhouse
03f5986c52 window: remove unused code 2024-04-29 09:52:01 -05:00
Tim Culverhouse
bb277b8e37 window: fix word wrapping 2024-04-19 19:31:37 -08:00
Tim Culverhouse
cde945f2ef build: use std.Build.path 2024-04-19 16:22:46 -08:00
Tim Culverhouse
b93a5d2c72 window: change print return value to struct, add commit option
Return more information from `print`. Add `commit` option which does a
"dry run" of printing and returns the size of the wrapped text.
2024-04-19 16:12:52 -08:00
Tim Culverhouse
cda3e1de79 window: mark initChild and wrap as deprecated 2024-04-19 08:10:36 -08:00
Tim Culverhouse
bc206f8716 key: consume num_lock and caps_lock for keymatching
Consume num_lock before keymatching. consume caps_lock for most
keymatches, except for matchText, which will consume caps_lock as
needed.

Fixes: #19
2024-04-17 15:04:50 -08:00
Tim Culverhouse
3a928be693 window: export hasMouse
hasMouse should have been marked pub
2024-04-16 16:06:14 -08:00
Tim Culverhouse
606272f471 widgets: add initial nvim implementation 2024-04-16 16:06:14 -08:00
Tomasz Lisowski
a34d20541e Fix usage example in README 2024-04-16 09:50:43 -05:00
Tim Culverhouse
47160418aa api: export InternalScreen as AllocatingScreen
I'm not thrilled with the name but we'll go with it for now
2024-04-15 07:15:26 -05:00
Tim Culverhouse
7ff5251ea3 color: generate color from a u24 2024-04-15 07:15:00 -05:00
Tim Culverhouse
18609912d3 cursor: implement cursor shapes 2024-04-15 07:14:31 -05:00
Daylin Morgan
b5c2d80f57 build: add build flag for example 2024-04-11 10:39:01 -05:00
Tim Culverhouse
40f80bef0c build: change example to examples/text_input
Will add more example runs later
2024-04-10 14:40:22 -05:00
Tim Culverhouse
d3f22e7612 window: add hasMouse and scroll methods 2024-04-10 14:37:28 -05:00