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,9 +879,16 @@ const KeyEventSequenceFmt = struct {
|
|||
key_events: []const KeyEvent,
|
||||
|
||||
pub fn format(self: @This(), writer: anytype) !void {
|
||||
for (self.key_events) |key_event|
|
||||
var first = true;
|
||||
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)});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
pub fn key_event_sequence_fmt(key_events: []const KeyEvent) KeyEventSequenceFmt {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue