refactor: add key event prefix to hints window title
This commit is contained in:
parent
4e4ec855ed
commit
3dfb93fbd2
1 changed files with 16 additions and 6 deletions
|
|
@ -91,6 +91,15 @@ fn render(mode: *keybind.Mode, bindings: []const keybind.Binding, theme: *const
|
|||
}
|
||||
if (widget_style.padding.top > 0) {
|
||||
top_layer_.cursor_move_yx(@intCast(0), @intCast(3)) catch return;
|
||||
if (key_events.len > 0) {
|
||||
_ = top_layer_.print("{s} {s}/{s} prefix: {s} {s}", .{
|
||||
widget_style.border.nib,
|
||||
keybind.get_namespace(),
|
||||
mode.bindings.config_section,
|
||||
key_events,
|
||||
widget_style.border.nie,
|
||||
}) catch {};
|
||||
} else {
|
||||
_ = top_layer_.print("{s} {s}/{s} {s}", .{
|
||||
widget_style.border.nib,
|
||||
keybind.get_namespace(),
|
||||
|
|
@ -98,6 +107,7 @@ fn render(mode: *keybind.Mode, bindings: []const keybind.Binding, theme: *const
|
|||
widget_style.border.nie,
|
||||
}) catch {};
|
||||
}
|
||||
}
|
||||
|
||||
// workaround vaxis.Layer issue
|
||||
const top_layer_window = top_layer_.window;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue