refactor: make get_char.options.start optional
This commit is contained in:
parent
b5e591c172
commit
f727c4882f
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ pub fn Create(options: type) type {
|
||||||
self.* = .{
|
self.* = .{
|
||||||
.allocator = allocator,
|
.allocator = allocator,
|
||||||
.ctx = .{ .args = try ctx.args.clone(allocator) },
|
.ctx = .{ .args = try ctx.args.clone(allocator) },
|
||||||
.value = options.start(self),
|
.value = if (@hasDecl(options, "start")) options.start(self) else {},
|
||||||
};
|
};
|
||||||
try self.commands.init(self);
|
try self.commands.init(self);
|
||||||
var mode = try keybind.mode("mini/get_char", allocator, .{
|
var mode = try keybind.mode("mini/get_char", allocator, .{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue