fix: remove trailing blank lines from info view

This commit is contained in:
CJ van den Berg 2026-02-05 21:40:20 +01:00
parent f0bf122f22
commit bc3f431dee
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -55,8 +55,9 @@ pub fn handle_resize(self: *Self, pos: Widget.Box) void {
pub fn append_content(self: *Self, content: []const u8) !void { pub fn append_content(self: *Self, content: []const u8) !void {
var iter = std.mem.splitScalar(u8, content, '\n'); 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); (try self.lines.addOne(self.allocator)).* = try self.allocator.dupe(u8, line);
};
} }
pub fn set_content(self: *Self, content: []const u8) !void { pub fn set_content(self: *Self, content: []const u8) !void {