From 863c3933d3b5c4fc3e38a7fe70ea3d61fe6c1907 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Thu, 11 Jan 2024 14:26:09 -0600 Subject: [PATCH] use keybind struct's built-in capabity to format itself in +list-keybinds action --- src/cli/list_keybinds.zig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cli/list_keybinds.zig b/src/cli/list_keybinds.zig index 15df1815e..2ded21adc 100644 --- a/src/cli/list_keybinds.zig +++ b/src/cli/list_keybinds.zig @@ -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; }