fix: compensate in keyhint formatting for cleaned-up keybind format

This commit is contained in:
CJ van den Berg 2025-12-02 14:24:46 +01:00
parent 83bbbfebe3
commit 4638c38032
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -133,14 +133,17 @@ fn render(mode: *keybind.Mode, bindings: []const keybind.Binding, theme: *const
break :blk writer.buffered();
};
plane.cursor_move_yx(@intCast(y), 0) catch break;
_ = plane.print("{s}", .{keybind_txt[key_events.len..]}) catch {};
switch (render_mode) {
.no_key_event_prefix => _ = plane.print("{s}", .{keybind_txt[key_events.len..]}) catch {},
.full => _ = plane.print(" {s}", .{keybind_txt}) catch {},
}
}
plane.set_style(style_label);
for (bindings[top..], 0..) |binding, y| {
if (y >= max_items) break;
const padding = max_prefix_len + 2;
const padding = max_prefix_len + 3;
const description = blk: {
const id = binding.commands[0].command_id orelse