From 1caf2aa0f6f98d24acf6a6e00ba7ecf0ad1eb3aa Mon Sep 17 00:00:00 2001 From: xdBronch <51252236+xdBronch@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:03:04 -0400 Subject: [PATCH] dont error on empty saves --- src/tui/editor.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index b1e53a3..8bd011f 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -451,7 +451,7 @@ pub const Editor = struct { fn save(self: *Self) !void { const b = if (self.buffer) |p| p else return error.Stop; - if (!b.is_dirty()) return tp.exit("no changes to save"); + if (!b.is_dirty()) return self.logger.print("no changes to save", .{}); if (self.file_path) |file_path| { if (self.buffer) |b_mut| try b_mut.store_to_file_and_clean(file_path); } else return error.SaveNoFileName;