feat: add palette for changing the current file type

This commit is contained in:
CJ van den Berg 2024-12-10 20:10:36 +01:00
parent c3021de372
commit 9fba9eba3c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 187 additions and 1 deletions

View file

@ -759,6 +759,11 @@ const cmds = struct {
}
pub const change_theme_meta = .{ .description = "Select color theme" };
pub fn change_file_type(self: *Self, _: Ctx) Result {
return self.enter_overlay_mode(@import("mode/overlay/file_type_palette.zig").Type);
}
pub const change_file_type_meta = .{ .description = "Change file type" };
pub fn exit_overlay_mode(self: *Self, _: Ctx) Result {
if (self.input_mode_outer == null) return;
if (self.input_mode) |*mode| mode.deinit();