refactor: unify list pointer rendering

This commit is contained in:
CJ van den Berg 2025-08-13 17:33:58 +02:00
parent c50ab782ec
commit 4d2c7d8a8c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
7 changed files with 18 additions and 17 deletions

View file

@ -166,8 +166,8 @@ fn handle_render_menu(self: *Self, button: *Button.State(*Menu.State(*Self)), th
button.plane.home();
}
const entry = &self.entries.items[idx];
const pointer = if (selected) "" else " ";
_ = button.plane.print("{s} ", .{pointer}) catch {};
button.plane.set_style(style_label);
tui.render_pointer(&button.plane, selected);
var buf: [std.fs.max_path_bytes]u8 = undefined;
var removed_prefix: usize = 0;
const max_len = self.view_cols / path_column_ratio;