From 77a9a6efb58393e3c5bc76e15fd7e8569cc985d5 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 12 Aug 2024 21:10:23 -0500 Subject: [PATCH] deps: update vaxis for more input controls Signed-off-by: Tim Culverhouse --- build.zig.zon | 4 ++-- src/app.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index c87e90b..926fd7e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -7,8 +7,8 @@ .hash = "1220affeb3fe37ef09411b5a213b5fdf9bb6568e9913bade204694648983a8b2776d", }, .vaxis = .{ - .url = "git+https://github.com/rockorager/libvaxis?ref=main#d36ab043caf7cbb24cae1bd0346dd6b654df0653", - .hash = "12206c252ee00b9dd0214989dfa35a6eea29ac7d65d4053817f161f4c23b6e09dd89", + .url = "git+https://github.com/rockorager/libvaxis?ref=main#707c050a76aaad6ce37314a4b15b77a34a9e2293", + .hash = "1220f3260273dd957a4ffb8b453e5b5a2204311ed06b2384e492d01ac06e751ae56b", }, .zeit = .{ .url = "git+https://github.com/rockorager/zeit?ref=main#9cca8ec620a54c3b07cd249f25e5bcb3153d03d7", diff --git a/src/app.zig b/src/app.zig index e5f97a6..be5a006 100644 --- a/src/app.zig +++ b/src/app.zig @@ -255,9 +255,9 @@ pub const App = struct { try input.insertSliceAtCursor(line); } } else if (key.matches(vaxis.Key.enter, .{})) { - if (input.buf.realLength() == 0) continue; const buffer = self.selectedBuffer() orelse @panic("no buffer"); const content = try input.toOwnedSlice(); + if (content.len == 0) continue; defer self.alloc.free(content); if (content[0] == '/') self.handleCommand(lua_state, buffer, content) catch |err| { -- 2.51.2