feat(buffers): add home screen save all command

This commit is contained in:
CJ van den Berg 2025-01-21 21:44:05 +01:00
parent 661808f316
commit 4dddadb46d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -245,6 +245,12 @@ const cmds = struct {
const Ctx = command.Context;
const Result = command.Result;
pub fn save_all(_: *Self, _: Ctx) Result {
if (tui.get_buffer_manager()) |bm|
bm.save_all() catch |e| return tp.exit_error(e, @errorReturnTrace());
}
pub const save_all_meta = .{ .description = "Save all changed files" };
pub fn home_menu_down(self: *Self, _: Ctx) Result {
self.menu.select_down();
}