diff --git a/src/pane.zig b/src/pane.zig index 0a2e18b..0329a8a 100644 --- a/src/pane.zig +++ b/src/pane.zig @@ -41,6 +41,11 @@ pub fn set_layout(layout: *Pane, initial_focus: *Pane) void { } pub fn init(term_io: *TermIO) !void { + term_io.enterRawMode(); + term_io.saveScreen(); + term_io.hideCursor(); + term_io.flush(); + var resize_handler = std.posix.Sigaction{ .handler = .{ .handler = resize_signal }, .mask = std.posix.empty_sigset, @@ -62,11 +67,6 @@ pub fn init(term_io: *TermIO) !void { }; try std.posix.sigaction(std.posix.SIG.SEGV, &panic_handler, null); - term_io.enterRawMode(); - term_io.saveScreen(); - term_io.hideCursor(); - term_io.flush(); - window.resize(term_io); try window.draw(term_io); }