feat: add config options to disable scrollbars and/or file icons

This commit is contained in:
CJ van den Berg 2025-03-06 17:11:49 +01:00
parent e70972f357
commit a5bf57e0e6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
8 changed files with 26 additions and 11 deletions

View file

@ -84,7 +84,10 @@ pub fn on_render_menu(_: *Type, button: *Type.ButtonState, theme: *const Widget.
if (!(cbor.matchString(&iter, &file_path_) catch false)) @panic("invalid buffer file path");
if (!(cbor.matchString(&iter, &icon) catch false)) @panic("invalid buffer file type icon");
if (!(cbor.matchInt(u24, &iter, &color) catch false)) @panic("invalid buffer file type color");
tui.render_file_icon(&button.plane, icon, color);
if (tui.config().show_fileicons) {
tui.render_file_icon(&button.plane, icon, color);
_ = button.plane.print(" ", .{}) catch {};
}
button.plane.set_style(style_label);
_ = button.plane.print(" {s} ", .{file_path_}) catch {};