feat: add interactive and non-interactive commands to set the current buffer's tab_width
This commit is contained in:
parent
1632061144
commit
3e0e75c9c8
3 changed files with 39 additions and 0 deletions
16
src/tui/mode/mini/tab_width.zig
Normal file
16
src/tui/mode/mini/tab_width.zig
Normal 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 {};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue