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.
Don't print 0 width graphemes or words. Usually these will be
overwritten since we advance by 0 columns, however if one is at the end
of text it can mess up rendering.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
- Added standard .gitattributes file for Zig projects.
- Reworked build.zig a little, hopefully it's a bit clearer. Also, now zig build will run all steps.
- outer: while in examples was redundant since there's only one loop to break from. switch expressions don't allow breaking from them, so breaking is only for loops, i.e. while and for.
- When returning a struct instance from a function, the compiler infers the return type from function signature, so instead of return MyType{...}; , it's more idiomatic to write return .{...};.
- Logging adds a new line by default, so you don't usually need to write \n like here: log.debug("event: {}\r\n", .{event});.
There will only ever be a handful of image implementations. Let's just
use a union enum for handling them.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This query has a response that interferes with key f4. We need to fix
that parsing before doing sixel queries, and we don't even support
sixels yet.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Implement our own grapheme measuring function which switches on whether
the terminal supports mode 2027
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
We don't need to keep references to the parent. We only need to
calculate offsets when we initialize a new window.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>