fix: update libvaxis and use stable upstream URL for zg
This commit is contained in:
parent
ce96caa3fc
commit
8308be76cd
3 changed files with 11 additions and 11 deletions
|
@ -30,8 +30,8 @@
|
||||||
.hash = "122019f077d09686b1ec47928ca2b4bf264422f3a27afc5b49dafb0129a4ceca0d01",
|
.hash = "122019f077d09686b1ec47928ca2b4bf264422f3a27afc5b49dafb0129a4ceca0d01",
|
||||||
},
|
},
|
||||||
.vaxis = .{
|
.vaxis = .{
|
||||||
.url = "https://github.com/neurocyte/libvaxis/archive/ad953bc553f064c18e801745233cbebd6ca9d00c.tar.gz",
|
.url = "https://github.com/neurocyte/libvaxis/archive/c26a190401bcd354263fa6f90446c947aca5ec2d.tar.gz",
|
||||||
.hash = "122008a492174c4e5057df3cddc5b05c3864883952bf7cbb6f5c3902e3bf79549f3c",
|
.hash = "1220f89a746527174f2f297f5f6f85e1cca4267d5f75c7b6b840926ff0b1bb187e97",
|
||||||
},
|
},
|
||||||
.zeit = .{
|
.zeit = .{
|
||||||
.url = "https://github.com/rockorager/zeit/archive/9cca8ec620a54c3b07cd249f25e5bcb3153d03d7.tar.gz",
|
.url = "https://github.com/rockorager/zeit/archive/9cca8ec620a54c3b07cd249f25e5bcb3153d03d7.tar.gz",
|
||||||
|
|
|
@ -38,10 +38,10 @@ pub const option = enum {
|
||||||
|
|
||||||
pub fn init(nopts: *const Options, parent_: Plane) !Plane {
|
pub fn init(nopts: *const Options, parent_: Plane) !Plane {
|
||||||
const opts = .{
|
const opts = .{
|
||||||
.x_off = nopts.x,
|
.x_off = @as(i17, @intCast(nopts.x)),
|
||||||
.y_off = nopts.y,
|
.y_off = @as(i17, @intCast(nopts.y)),
|
||||||
.width = .{ .limit = nopts.cols },
|
.width = @as(u16, @intCast(nopts.cols)),
|
||||||
.height = .{ .limit = nopts.rows },
|
.height = @as(u16, @intCast(nopts.rows)),
|
||||||
.border = .{},
|
.border = .{},
|
||||||
};
|
};
|
||||||
var plane: Plane = .{
|
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 {
|
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);
|
const w = self.window.gwidth(egc);
|
||||||
cell.char.grapheme = self.cache.put(egc);
|
cell.char.grapheme = self.cache.put(egc);
|
||||||
cell.char.width = w;
|
cell.char.width = @intCast(w);
|
||||||
if (self.transparent) {
|
if (self.transparent) {
|
||||||
cell.style.fg = self.style.fg;
|
cell.style.fg = self.style.fg;
|
||||||
} else {
|
} else {
|
||||||
cell.style = self.style;
|
cell.style = self.style;
|
||||||
}
|
}
|
||||||
self.window.writeCell(col, row, cell);
|
self.window.writeCell(@intCast(col), @intCast(row), cell);
|
||||||
self.col += @intCast(w);
|
self.col += @intCast(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -486,7 +486,7 @@ const Loop = struct {
|
||||||
switch (builtin.os.tag) {
|
switch (builtin.os.tag) {
|
||||||
.windows => {
|
.windows => {
|
||||||
var parser: vaxis.Parser = .{
|
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");
|
const a = self.vaxis.opts.system_clipboard_allocator orelse @panic("no tty allocator");
|
||||||
while (!self.should_quit) {
|
while (!self.should_quit) {
|
||||||
|
@ -495,7 +495,7 @@ const Loop = struct {
|
||||||
},
|
},
|
||||||
else => {
|
else => {
|
||||||
var parser: vaxis.Parser = .{
|
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");
|
const a = self.vaxis.opts.system_clipboard_allocator orelse @panic("no tty allocator");
|
||||||
|
|
Loading…
Add table
Reference in a new issue