feat: allow calling create_scratch_buffer with no parameters

This commit is contained in:
CJ van den Berg 2025-02-13 11:51:10 +01:00
parent b009d1a23a
commit 641d92a5cc
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -4072,7 +4072,10 @@ pub const Editor = struct {
} else if (ctx.args.match(.{tp.extract(&file_path)}) catch false) {
try self.open_scratch(file_path, "", null);
self.clamp();
} else return error.InvalidOpenScratchBufferArgument;
} else {
try self.open_scratch("*scratch*", "", null);
self.clamp();
}
}
pub const open_scratch_buffer_meta = .{ .arguments = &.{ .string, .string } };