don't write ":" when printing keybinding action with no argument

This commit is contained in:
gabydd
2024-01-22 21:01:16 -05:00
parent 19fec4d151
commit 6f04bd4a79

View File

@ -398,9 +398,11 @@ pub const Action = union(enum) {
// All actions start with the tag. // All actions start with the tag.
try writer.print("{s}", .{@tagName(self)}); try writer.print("{s}", .{@tagName(self)});
// Write the value depending on the type // Only write the value depending on the type if it's not void
try writer.writeAll(":"); if (@TypeOf(value) != void) {
try formatValue(writer, value); try writer.writeAll(":");
try formatValue(writer, value);
}
}, },
} }
} }