fix: don't add an extra space at the beginning of formatted keybinds
This commit is contained in:
parent
b3425d5c59
commit
4d81123c76
1 changed files with 9 additions and 2 deletions
|
|
@ -879,8 +879,15 @@ const KeyEventSequenceFmt = struct {
|
||||||
key_events: []const KeyEvent,
|
key_events: []const KeyEvent,
|
||||||
|
|
||||||
pub fn format(self: @This(), writer: anytype) !void {
|
pub fn format(self: @This(), writer: anytype) !void {
|
||||||
for (self.key_events) |key_event|
|
var first = true;
|
||||||
try writer.print(" {f}", .{input.key_event_short_fmt(key_event)});
|
for (self.key_events) |key_event| {
|
||||||
|
if (first) {
|
||||||
|
first = false;
|
||||||
|
} else {
|
||||||
|
try writer.print(" ", .{});
|
||||||
|
}
|
||||||
|
try writer.print("{f}", .{input.key_event_short_fmt(key_event)});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue