refactor: make get_char.options.start optional

This commit is contained in:
CJ van den Berg 2025-11-02 20:40:03 +01:00
parent b5e591c172
commit f727c4882f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -34,7 +34,7 @@ pub fn Create(options: type) type {
self.* = .{
.allocator = 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);
var mode = try keybind.mode("mini/get_char", allocator, .{