Skip to content

Commit

Permalink
fix: start with updateStyle()
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrocket committed Sep 12, 2024
1 parent ab0ab03 commit 8663ac2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const Core = struct {
return .{ .allocator = gpallocator };
}

fn start(self: *Core) void {
fn start(self: *Core, style: Style) !void {
_ = tb.tb_init();

if (self.columns == null) {
Expand All @@ -136,6 +136,7 @@ const Core = struct {

self.setActive(true);
self.updateTermSize();
try self.updateStyle(style);
}

fn shutdown(self: *Core) void {
Expand Down Expand Up @@ -519,7 +520,7 @@ pub fn main() !void {
}

if (!(main_cmd.checkFlag("version") or main_cmd.checkFlag("help") or main_cmd.checkFlag("usage"))) {
core.start();
try core.start(handler.style);

if (core.width < 4 or core.height < 2) {
core.setActive(false);
Expand Down

0 comments on commit 8663ac2

Please sign in to comment.