From bc3f431deead124b10bddeb4dc4f37f29fd3f662 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 5 Feb 2026 21:40:20 +0100 Subject: [PATCH] fix: remove trailing blank lines from info view --- src/tui/info_view.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tui/info_view.zig b/src/tui/info_view.zig index 7475804..c3ee40b 100644 --- a/src/tui/info_view.zig +++ b/src/tui/info_view.zig @@ -55,8 +55,9 @@ pub fn handle_resize(self: *Self, pos: Widget.Box) void { pub fn append_content(self: *Self, content: []const u8) !void { var iter = std.mem.splitScalar(u8, content, '\n'); - while (iter.next()) |line| + while (iter.next()) |line| if (line.len > 0) { (try self.lines.addOne(self.allocator)).* = try self.allocator.dupe(u8, line); + }; } pub fn set_content(self: *Self, content: []const u8) !void {