From 6f04bd4a79668c78bb0c64df889759bc903574a2 Mon Sep 17 00:00:00 2001 From: gabydd Date: Mon, 22 Jan 2024 21:01:16 -0500 Subject: [PATCH] don't write ":" when printing keybinding action with no argument --- src/input/Binding.zig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/input/Binding.zig b/src/input/Binding.zig index c2b1e5df0..84eb3fe1c 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -398,9 +398,11 @@ pub const Action = union(enum) { // All actions start with the tag. try writer.print("{s}", .{@tagName(self)}); - // Write the value depending on the type - try writer.writeAll(":"); - try formatValue(writer, value); + // Only write the value depending on the type if it's not void + if (@TypeOf(value) != void) { + try writer.writeAll(":"); + try formatValue(writer, value); + } }, } }