summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2025-08-27 13:54:09 +0900
committerNguyễn Gia Phong <cnx@loang.net>2025-08-27 14:05:42 +0900
commitd95c8f9baa6272dee6bfbadbb7ca8e055672a75a (patch)
tree8917f83cd48326a754a4f5c4bd0c3ad2b01bd21d /src
parent7e73d0a61b14b0a454905a1298c56529b0ad6727 (diff)
downloadkay-main.tar.gz
Ensure TTY restoration HEAD main
Diffstat (limited to 'src')
-rw-r--r--src/main.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 2a4c39d..7cfb0f6 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -140,6 +140,8 @@ pub fn main() !void {
         .Debug, .ReleaseSafe => debug_allocator.allocator(),
         .ReleaseFast, .ReleaseSmall => smp_allocator,
     };
+    zsanett.init();
+    defer zsanett.deinit();
 
     var tty = try Tty.init();
     defer tty.deinit();
@@ -163,8 +165,6 @@ pub fn main() !void {
     try vx.enterAltScreen(tty.anyWriter());
     try vx.queryTerminal(tty.anyWriter(), 1 * ns_per_s); // for alt screen
 
-    zsanett.init();
-    defer zsanett.deinit();
     try zsanett.def("kay/path", args[1], "Path to file.");
     try zsanett.def("kay/env", Environment{
         .allocator = allocator,