fix: update libvaxis and use stable upstream URL for zg

This commit is contained in:
CJ van den Berg 2024-11-14 15:34:06 +01:00
parent ce96caa3fc
commit 8308be76cd
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 11 additions and 11 deletions

View file

@ -30,8 +30,8 @@
.hash = "122019f077d09686b1ec47928ca2b4bf264422f3a27afc5b49dafb0129a4ceca0d01",
},
.vaxis = .{
.url = "https://github.com/neurocyte/libvaxis/archive/ad953bc553f064c18e801745233cbebd6ca9d00c.tar.gz",
.hash = "122008a492174c4e5057df3cddc5b05c3864883952bf7cbb6f5c3902e3bf79549f3c",
.url = "https://github.com/neurocyte/libvaxis/archive/c26a190401bcd354263fa6f90446c947aca5ec2d.tar.gz",
.hash = "1220f89a746527174f2f297f5f6f85e1cca4267d5f75c7b6b840926ff0b1bb187e97",
},
.zeit = .{
.url = "https://github.com/rockorager/zeit/archive/9cca8ec620a54c3b07cd249f25e5bcb3153d03d7.tar.gz",

View file

@ -38,10 +38,10 @@ pub const option = enum {
pub fn init(nopts: *const Options, parent_: Plane) !Plane {
const opts = .{
.x_off = nopts.x,
.y_off = nopts.y,
.width = .{ .limit = nopts.cols },
.height = .{ .limit = nopts.rows },
.x_off = @as(i17, @intCast(nopts.x)),
.y_off = @as(i17, @intCast(nopts.y)),
.width = @as(u16, @intCast(nopts.cols)),
.height = @as(u16, @intCast(nopts.rows)),
.border = .{},
};
var plane: Plane = .{
@ -195,16 +195,16 @@ pub fn putc_yx(self: *Plane, y: c_int, x: c_int, cell: *const Cell) !usize {
}
fn write_cell(self: *Plane, col: usize, row: usize, egc: []const u8) void {
var cell: vaxis.Cell = self.window.readCell(col, row) orelse .{ .style = self.style };
var cell: vaxis.Cell = self.window.readCell(@intCast(col), @intCast(row)) orelse .{ .style = self.style };
const w = self.window.gwidth(egc);
cell.char.grapheme = self.cache.put(egc);
cell.char.width = w;
cell.char.width = @intCast(w);
if (self.transparent) {
cell.style.fg = self.style.fg;
} else {
cell.style = self.style;
}
self.window.writeCell(col, row, cell);
self.window.writeCell(@intCast(col), @intCast(row), cell);
self.col += @intCast(w);
}

View file

@ -486,7 +486,7 @@ const Loop = struct {
switch (builtin.os.tag) {
.windows => {
var parser: vaxis.Parser = .{
.grapheme_data = &self.vaxis.unicode.grapheme_data,
.grapheme_data = &self.vaxis.unicode.width_data.g_data,
};
const a = self.vaxis.opts.system_clipboard_allocator orelse @panic("no tty allocator");
while (!self.should_quit) {
@ -495,7 +495,7 @@ const Loop = struct {
},
else => {
var parser: vaxis.Parser = .{
.grapheme_data = &self.vaxis.unicode.grapheme_data,
.grapheme_data = &self.vaxis.unicode.width_data.g_data,
};
const a = self.vaxis.opts.system_clipboard_allocator orelse @panic("no tty allocator");