feat: add interactive and non-interactive commands to set the current buffer's tab_width

This commit is contained in:
CJ van den Berg 2025-08-11 14:29:23 +02:00
parent 1632061144
commit 3e0e75c9c8
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,16 @@
const command = @import("command");
pub const Type = @import("numeric_input.zig").Create(@This());
pub const create = Type.create;
pub fn name(_: *Type) []const u8 {
return " tab size";
}
pub const preview = goto;
pub const apply = goto;
pub const cancel = goto;
fn goto(self: *Type) void {
command.executeName("set_tab_width", command.fmt(.{self.input orelse self.start})) catch {};
}