commits
When drawing on the primary screen The internal state of the cursor
location was not being updated. This resulted in an invalid state and a
messed up screen
Fixes: https://github.com/rockorager/libvaxis/issues/63
Add a method that allows users of the library to pre-encode an image
using whichever base64 encoder they want (ie a simd encoder).
We must send image dimensions for these particular formats
And with other transmission formats
AFAIK zig lacks a way of overriding module dependencies of dependencies.
LoopWithModules lets you use aio backend with vaxis using aio and coro
modules that are not included by vaxis, when this function is used
`include_aio` is not neccessary.
Fixes #49.
If a user has passed an initial working directory, set that as the
set that as the terminal's working directory when we spawn the widget.
on macOS, `@alignOf(std.c.max_align_t)` is 8, while `@alignOf(i128)`
is 16. since we moved to using `std.time.Timer`, render duration
should always be an unsigned quantity.
this change is motivated by my seamstress project, which wants to use
a Vaxis struct (well, something with a Vaxis struct as a field) as a
Lua userdata. it turns out that Lua won't allocate at an alignment
greater than `@alignOf(std.c.max_align_t)` even if you ask it to.
If the text was printed with a wrap, and we can determine this from the
`print` method in Window, then we rely on the terminal for wrapping.
This can help with primary screen text reflowing on resize
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Implement mode 2048 for in-band window resize reports.
Reference: https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
Update to latest aio, which has minor changes such as the thread pool
argument and special aio.ReadTty operation.
In future the aio.ReadTty might have option to translate to vt escape
sequences, but for vaxis it will use the direct mode.
I was not really able to test the windows at all actually as wine did
not seem to play nice with any vaxis example, but it compiles and ...
runs?
This makes `xev.TtyWatcher` behave according to my expectations:
namely that the callback will only file after the function which
registers it has returned.
disabled by default, aio/coro might not be that mature yet.
however, appreciated if people give it a go and report issues.
Commit 74fb13079794 "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.
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.
this commit adds convenience to `Window.print` by allowing it to
start printing at a nonzero column.
Asciinema now recognizes ':' delimiters
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
And use a buffered writer in the example
Note: we still need to parse the events.
The neovim widget was great. But we have a full virtual terminal widget
now, which doesn't bring in extra dependencies.
Commit ec98c7cd3d0d 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.
on macOS, `@alignOf(std.c.max_align_t)` is 8, while `@alignOf(i128)`
is 16. since we moved to using `std.time.Timer`, render duration
should always be an unsigned quantity.
this change is motivated by my seamstress project, which wants to use
a Vaxis struct (well, something with a Vaxis struct as a field) as a
Lua userdata. it turns out that Lua won't allocate at an alignment
greater than `@alignOf(std.c.max_align_t)` even if you ask it to.
Update to latest aio, which has minor changes such as the thread pool
argument and special aio.ReadTty operation.
In future the aio.ReadTty might have option to translate to vt escape
sequences, but for vaxis it will use the direct mode.
I was not really able to test the windows at all actually as wine did
not seem to play nice with any vaxis example, but it compiles and ...
runs?
Commit 74fb13079794 "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.
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.