Commit graph

372 commits

Author SHA1 Message Date
0f9824d08b
wip: macos 2024-07-10 22:40:29 +02:00
045955d5db
wip: macos 2024-07-10 22:39:45 +02:00
54c43bab5d
wip: macos 2024-07-04 14:53:40 +02:00
CJ van den Berg
c213919849 tty(windows): fix resize event screen size translation from srWindow 2024-06-27 15:24:09 -07:00
Jari Vetoniemi
b84f9e58a6 vaxis: add aio event loop and example
disabled by default, aio/coro might not be that mature yet.
however, appreciated if people give it a go and report issues.
2024-06-27 08:32:21 -07:00
Tim Culverhouse
935c5a54bc window(wrap): refactor word wrap
Commit 74fb130797 "fix: `Window.printSegments` correctly prints all
non-trailing whitespace" fixed some bugs with word wrapping, but also
introduced a bug with printing leading whitespace in a segment.

Refactor the entire word wrap logic to use a custom LineIterator and a
tokenizer which gives whitespace tokens as well.
2024-06-26 12:40:50 -05:00
Tim Culverhouse
7c03077177 window: use saturating sub in border calcs 2024-06-25 09:07:33 -05:00
Jari Vetoniemi
40e5b673b6 scrollbar: use divCeil to calculate correct height 2024-06-25 06:57:52 -07:00
Rylee Lyman
f7cbd42ed5 fix: pass tests 2024-06-25 06:55:44 -07:00
Rylee Lyman
74fb130797 fix: Window.printSegments correctly prints all non-trailing whitespace
I'm told it's not unusual in the web world for multiple whitespace
characters to be consumed as a single space. If that is the intention
for `.word` wrap, that's fine with me! If not, this PR correctly
prints all non-trailing whitespace.

I also chose to consume a `\r\n` sequence as intending a single newline,
while all other sequences of `\r` and `\n` should produce multiple newlines.
2024-06-25 06:55:44 -07:00
Tim Culverhouse
fcb705adaa mouse: remove translateMouse debug log 2024-06-24 12:47:45 -05:00
Rylee Lyman
b2151349ad feat: add col_offset to Window.print
this commit adds convenience to `Window.print` by allowing it to
start printing at a nonzero column.
2024-06-21 02:57:58 -07:00
Tim Culverhouse
6e85cd1fca quirks: remove asciinema quirk
Asciinema now recognizes ':' delimiters

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-06-20 14:32:45 -05:00
Tim Culverhouse
3b06180fdb key: remove unused buffer and len 2024-06-19 09:50:01 -05:00
Tim Culverhouse
0c91840b32 widgets(terminal): implement OSC 7 for pwd reporting 2024-06-19 09:23:11 -05:00
Tim Culverhouse
7005bb237c widgets(terminal): add initial_working_directory option 2024-06-19 07:11:02 -05:00
Tim Culverhouse
6043f0569a widgets(terminal): remove error logs
And use a buffered writer in the example
2024-06-18 18:41:48 -05:00
Rylee Lyman
f25a9b9660 fix: deinit TTY to avoid stair-stepped output 2024-06-13 12:34:03 -07:00
Tim Culverhouse
975dd01a77 readme: add supported operating systems 2024-06-13 12:51:49 -05:00
Rylee Lyman
f57ba4b477 fix: add ThreadPool for key events on macOS 2024-06-13 07:40:24 -07:00
Tim Culverhouse
254cc0aac0 ci: use mlugg/setup-zig 2024-06-13 08:19:15 -05:00
CJ van den Berg
3a0392c282 tty(windows): fix mouse wheel direction calculation 2024-06-13 05:59:11 -07:00
Tim Culverhouse
36696e8785 tty(windows): parse mouse events 2024-06-13 07:16:46 -05:00
CJ van den Berg
790dbaae24 build: allow building on freebsd 2024-06-13 04:17:45 -07:00
Tim Culverhouse
f230f0c30a widgets(terminal): send a redraw event 2024-06-12 19:29:19 -05:00
Tim Culverhouse
8f4ca5b830 tty(windows): enable_extended_flags
Note: we still need to parse the events.
2024-06-12 11:15:16 -05:00
Tim Culverhouse
cea5798db9 widgets(terminal): ensure only one sigchild handler installed 2024-06-12 06:36:07 -05:00
Tim Culverhouse
bf0828f9ef build: update minimum zig version 2024-06-11 20:41:02 -05:00
Tim Culverhouse
46e7fd8fc6 widgets: remove neovim widget
The neovim widget was great. But we have a full virtual terminal widget
now, which doesn't bring in extra dependencies.
2024-06-11 20:35:10 -05:00
Tim Culverhouse
88d6c76fa8 fix(readme): restore vaxis.gif 2024-06-11 20:32:39 -05:00
Tim Culverhouse
96387d43e6 build: change neovim default to true
Commit ec98c7cd3d fixed the default value to match the description,
however this resulted in the docs failing to build since the files are
needed in the default build case.

Update the default and description to true.
2024-06-11 20:29:18 -05:00
Frederico Winter
ec98c7cd3d changed the default value of the nvim option to correspond to it's default description 2024-06-11 18:27:00 -07:00
Tim Culverhouse
9c723bb645 examples(vt): use shell environment for command 2024-06-11 19:09:55 -05:00
Tim Culverhouse
389ac3ef40 widgets(terminal): clean up accidentally included files 2024-06-11 14:07:01 -05:00
Tim Culverhouse
6d4c180e31 widgets(terminal): implement legacy key encoding 2024-06-11 14:00:37 -05:00
Tim Culverhouse
7954e8c9ba build: use upstream zg
My commit for replacement characters was merged
2024-06-11 14:00:02 -05:00
Tim Culverhouse
37b0d5c69d widgets(terminal): read full codepoints
Only read full codepoints. Some programs will split codepoints between
reads, which can mess with our parser (looking at you, btop)
2024-06-11 13:59:07 -05:00
Tim Culverhouse
eeb69f012a widgets(terminal): fix cursor showing 2024-06-11 10:28:07 -05:00
Tim Culverhouse
05f52ed4ee widgets(terminal): implement escapes, fix scrollDown 2024-06-11 10:27:18 -05:00
Tim Culverhouse
b688732f56 widgets(terminal): use buffered reader in parser
Use a buffered reader so we can inspect the read state. We need this to
know if we have a finished read on a printable byte
2024-06-10 15:07:04 -05:00
Tim Culverhouse
9f2af4d5ee widgets(terminal): implement even more csi sequences 2024-06-10 14:18:55 -05:00
Tim Culverhouse
3ab3edf6bf widgets(terminal): use zg fork 2024-06-10 14:18:32 -05:00
Tim Culverhouse
e4005253d2 widgets(terminal): fix eraseLeft 2024-06-10 14:18:32 -05:00
Tim Culverhouse
0cd57fe0f5 widgets(terminal): implement many more CSI seqs 2024-06-10 14:18:32 -05:00
Tim Culverhouse
24ad3bf3da widgets(terminal): handle erase in display 2024-06-10 14:18:32 -05:00
Tim Culverhouse
c14a100eed widgets(terminal): handle horizontal tabs 2024-06-10 14:18:32 -05:00
Tim Culverhouse
1c5ecae8f0 widgets(terminal): implement CNL 2024-06-10 14:18:32 -05:00
Tim Culverhouse
99ff37840d widgets(terminal): refactor CUD and CR 2024-06-10 14:18:32 -05:00
Tim Culverhouse
2f2e38eea5 widgets(terminal): set global_vts to null on last exit 2024-06-10 14:18:32 -05:00
Tim Culverhouse
044b099227 widgets(terminal): handle scrolling_region in CUU, CUD 2024-06-10 14:18:32 -05:00