use keybind struct's built-in capabity to format itself in +list-keybinds action

This commit is contained in:
Jeffrey C. Ollie
2024-01-11 14:26:09 -06:00
committed by Mitchell Hashimoto
parent 73a30ccd82
commit 863c3933d3

View File

@ -46,12 +46,7 @@ pub fn run(alloc: Allocator) !u8 {
defer config.deinit();
const stdout = std.io.getStdOut().writer();
var iter = config.keybind.set.bindings.iterator();
while (iter.next()) |next| {
const keys = next.key_ptr.*;
const value = next.value_ptr.*;
try stdout.print("{}={}\n", .{ keys, value });
}
try config.keybind.formatConfig(stdout, "keybind=");
return 0;
}