feat: allow calling create_scratch_buffer with no parameters
This commit is contained in:
parent
b009d1a23a
commit
641d92a5cc
1 changed files with 4 additions and 1 deletions
|
@ -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 } };
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue