feat: add simple add_split command (wip)
This commit is contained in:
parent
d6ea615283
commit
8dea591341
1 changed files with 11 additions and 0 deletions
|
@ -439,6 +439,11 @@ const cmds = struct {
|
||||||
}
|
}
|
||||||
pub const show_home_meta = .{};
|
pub const show_home_meta = .{};
|
||||||
|
|
||||||
|
pub fn add_split(self: *Self, _: Ctx) Result {
|
||||||
|
return self.create_home_split();
|
||||||
|
}
|
||||||
|
pub const add_split_meta = .{};
|
||||||
|
|
||||||
pub fn gutter_mode_next(self: *Self, _: Ctx) Result {
|
pub fn gutter_mode_next(self: *Self, _: Ctx) Result {
|
||||||
const tui_ = tui.current();
|
const tui_ = tui.current();
|
||||||
var ln = tui_.config.gutter_line_numbers;
|
var ln = tui_.config.gutter_line_numbers;
|
||||||
|
@ -743,6 +748,12 @@ fn create_home(self: *Self) !void {
|
||||||
tui.current().resize();
|
tui.current().resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn create_home_split(self: *Self) !void {
|
||||||
|
tui.reset_drag_context();
|
||||||
|
try self.add_view(try home.create(self.allocator, Widget.to(self)));
|
||||||
|
tui.current().resize();
|
||||||
|
}
|
||||||
|
|
||||||
fn write_restore_info(self: *Self) void {
|
fn write_restore_info(self: *Self) void {
|
||||||
const editor = self.get_active_editor() orelse return;
|
const editor = self.get_active_editor() orelse return;
|
||||||
var sfa = std.heap.stackFallback(512, self.allocator);
|
var sfa = std.heap.stackFallback(512, self.allocator);
|
||||||
|
|
Loading…
Add table
Reference in a new issue