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
|
@ -38,19 +38,11 @@ pub fn create(allocator: Allocator, _: command.Context) !struct { tui.Mode, tui.
|
|||
@memcpy(self.buf[0..text.len], text);
|
||||
self.input = self.buf[0..text.len];
|
||||
};
|
||||
const input_handler, const keybind_hints = try keybind.mode("mini/find_in_files", allocator, .{
|
||||
var mode = try keybind.mode("mini/find_in_files", allocator, .{
|
||||
.insert_command = "mini_mode_insert_bytes",
|
||||
});
|
||||
return .{
|
||||
.{
|
||||
.input_handler = input_handler,
|
||||
.event_handler = EventHandler.to_owned(self),
|
||||
.keybind_hints = keybind_hints,
|
||||
},
|
||||
.{
|
||||
.name = name,
|
||||
},
|
||||
};
|
||||
mode.event_handler = EventHandler.to_owned(self);
|
||||
return .{ mode, .{ .name = name } };
|
||||
}
|
||||
return error.NotFound;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue