fix: queue quit command to run after an async save_file

closes #60
This commit is contained in:
CJ van den Berg 2024-10-27 20:31:07 +01:00
parent 67813fbb07
commit a9058ef949
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 27 additions and 7 deletions

View file

@ -644,8 +644,7 @@ const cmds_ = struct {
pub const @"q!_meta" = .{ .description = "q! (quit without saving)" };
pub fn wq(self: *Self, _: Ctx) Result {
try self.cmd("save_file", .{});
try self.cmd("quit", .{});
try self.cmd("save_file", command.fmt(.{ "then", .{ "quit", .{} } }));
}
pub const wq_meta = .{ .description = "wq (write file and quit)" };