Skip to content
Discussion options

You must be logged in to vote

Ok, found a workaround. Just starting the app.run() inside a loop which only exits and reloads the App struct when a particular section is active. While it seems kind of a hack, it works good so far...

    var tui_buffer: [1024]u8 = undefined;
    var app: vxfw.App = undefined;
    const root_struct = try RootStruct.init(gpa, arena, io, cont_opts, config, env_map, cwd);
    defer root_struct.deinit();

    app_loop: while (true) {
        app = try .init(io, gpa, init.environ_map, &tui_buffer);
        try app.run(root_struct.widget(), .{});
        if (root_struct.active_section == .inner_tui) {
            app.deinit();
            try root_struct.openFileInTui();
            root_struct.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lukeflo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant