diff --git a/README.md b/README.md index 8dcef63..d4e1889 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ https://github.com/neurocyte/flow/assets/1552770/97aae817-c209-4c08-bc65-0a0bf1f curl -fsSL https://flow-control.dev/install | sh ``` -Binary release builds are found here: [neurocyte/flow/releases](https://github.com/neurocyte/flow/releases) +Binary release builds are found here: [neurocyte/flow/releases](https://github.com/neurocyte/flow/releases/latest) -Nightly binary builds are found here: [neurocyte/flow-nightly/releases](https://github.com/neurocyte/flow-nightly/releases) +Nightly binary builds are found here: [neurocyte/flow-nightly/releases](https://github.com/neurocyte/flow-nightly/releases/latest) Or check your favorite local system package repository. diff --git a/src/tui/WidgetList.zig b/src/tui/WidgetList.zig index 3e3274a..c7c1e47 100644 --- a/src/tui/WidgetList.zig +++ b/src/tui/WidgetList.zig @@ -93,8 +93,10 @@ pub fn addP(self: *Self, w_: Widget) !*Widget { } pub fn remove(self: *Self, w: Widget) void { - for (self.widgets.items, 0..) |p, i| if (p.widget.ptr == w.ptr) + for (self.widgets.items, 0..) |p, i| if (p.widget.ptr == w.ptr) { self.widgets.orderedRemove(i).widget.deinit(self.allocator); + return; + }; } pub fn remove_all(self: *Self) void { diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index 452776f..f4b3d40 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -28,6 +28,7 @@ const home = @import("home.zig"); const logview = @import("logview.zig"); const filelist_view = @import("filelist_view.zig"); const info_view = @import("info_view.zig"); +const input_view = @import("inputview.zig"); const Self = @This(); const Commands = command.Collection(cmds); @@ -514,6 +515,8 @@ const cmds = struct { try self.toggle_panel_view(info_view, false) else if (self.is_panel_view_showing(filelist_view)) try self.toggle_panel_view(filelist_view, false) + else if (self.is_panel_view_showing(input_view)) + try self.toggle_panel_view(input_view, false) else try self.toggle_panel_view(logview, false); } @@ -530,7 +533,7 @@ const cmds = struct { pub const show_logview_meta: Meta = .{ .description = "View log" }; pub fn toggle_inputview(self: *Self, _: Ctx) Result { - try self.toggle_panel_view(@import("inputview.zig"), false); + try self.toggle_panel_view(input_view, false); } pub const toggle_inputview_meta: Meta = .{ .description = "Toggle raw input log" };