refactor: improve capsulation and safety of tui module public api

This commit is contained in:
CJ van den Berg 2025-01-23 16:45:04 +01:00
parent 4145460012
commit 1d947ab499
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
28 changed files with 239 additions and 198 deletions

View file

@ -20,7 +20,7 @@ pub const Entry = struct {
};
pub fn load_entries(palette: *Type) !usize {
const hints = if (tui.current().input_mode) |m| m.keybind_hints else @panic("no keybind hints");
const hints = if (tui.input_mode()) |m| m.keybind_hints else @panic("no keybind hints");
var longest_hint: usize = 0;
for (command.commands.items) |cmd_| if (cmd_) |p| {
if (p.meta.description.len > 0) {