feat: move all keybind mode related options to keybind config
This commit is contained in:
parent
cf1befe3fa
commit
3b8982ac26
12 changed files with 85 additions and 140 deletions
|
@ -48,19 +48,11 @@ pub fn Create(options: type) type {
|
|||
try options.load_entries(self);
|
||||
if (@hasDecl(options, "restore_state"))
|
||||
options.restore_state(self) catch {};
|
||||
const input_handler, const keybind_hints = try keybind.mode("mini/file_browser", allocator, .{
|
||||
var mode = try keybind.mode("mini/file_browser", allocator, .{
|
||||
.insert_command = "mini_mode_insert_bytes",
|
||||
});
|
||||
return .{
|
||||
.{
|
||||
.input_handler = input_handler,
|
||||
.event_handler = EventHandler.to_owned(self),
|
||||
.keybind_hints = keybind_hints,
|
||||
},
|
||||
.{
|
||||
.name = options.name(self),
|
||||
},
|
||||
};
|
||||
mode.event_handler = EventHandler.to_owned(self);
|
||||
return .{ mode, .{ .name = options.name(self) } };
|
||||
}
|
||||
|
||||
pub fn deinit(self: *Self) void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue