refactor: move mini mode name and remove unused mode description field

This commit is contained in:
CJ van den Berg 2024-10-26 16:33:59 +02:00
parent 0ef553e4c6
commit f67bfab5b7
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
18 changed files with 21 additions and 29 deletions

View file

@ -758,6 +758,7 @@ const cmds = struct {
pub const MiniMode = struct {
event_handler: ?EventHandler = null,
name: []const u8,
text: []const u8 = "",
cursor: ?usize = null,
};
@ -776,7 +777,12 @@ fn context_check() void {
}
pub fn get_mode() []const u8 {
return if (current().input_mode) |m| m.name else "INI";
return if (current().mini_mode) |m|
m.name
else if (current().input_mode) |m|
m.name
else
"INI";
}
pub fn reset_drag_context() void {