From c5fe992f75fc855e16f4fe8a17924620fa112d58 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 16 Jul 2025 16:35:22 +0200 Subject: [PATCH] feat: add toggle_auto_save command --- src/tui/editor.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 5a3452f..76b4a5f 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -4774,6 +4774,11 @@ pub const Editor = struct { pub const SaveOption = enum { default, format, no_format }; + pub fn toggle_auto_save(self: *Self, _: Context) Result { + self.enable_auto_save = !self.enable_auto_save; + } + pub const toggle_auto_save_meta: Meta = .{ .description = "Toggle auto save" }; + pub fn toggle_format_on_save(self: *Self, _: Context) Result { self.enable_format_on_save = !self.enable_format_on_save; }