fix: remove trailing blank lines from info view
This commit is contained in:
parent
f0bf122f22
commit
bc3f431dee
1 changed files with 2 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue