feat: add toggle_auto_find command
This commit is contained in:
parent
013f8f4adc
commit
f686ca96d2
1 changed files with 7 additions and 0 deletions
|
|
@ -1064,6 +1064,13 @@ const cmds = struct {
|
||||||
}
|
}
|
||||||
pub const scroll_keybind_hints_meta: Meta = .{ .description = "Scroll keybind hints" };
|
pub const scroll_keybind_hints_meta: Meta = .{ .description = "Scroll keybind hints" };
|
||||||
|
|
||||||
|
pub fn toggle_auto_find(self: *Self, _: Ctx) Result {
|
||||||
|
defer self.logger.print("auto find {s}", .{if (self.config_.enable_auto_find) "enabled" else "disabled"});
|
||||||
|
self.config_.enable_auto_find = !self.config_.enable_auto_find;
|
||||||
|
try save_config();
|
||||||
|
}
|
||||||
|
pub const toggle_auto_find_meta: Meta = .{ .description = "Toggle auto find mode" };
|
||||||
|
|
||||||
pub fn force_color_scheme(self: *Self, ctx: Ctx) Result {
|
pub fn force_color_scheme(self: *Self, ctx: Ctx) Result {
|
||||||
self.force_color_scheme(if (try ctx.args.match(.{"dark"}))
|
self.force_color_scheme(if (try ctx.args.match(.{"dark"}))
|
||||||
.dark
|
.dark
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue