fix: paste in mini and overlay modes

This commit is contained in:
CJ van den Berg 2024-11-22 12:39:22 +01:00
parent 0f509df2d4
commit 279789d4fa
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 25 additions and 0 deletions

View file

@ -332,6 +332,11 @@ pub fn Create(options: type) type {
self.update_mini_mode_text();
}
pub const mini_mode_select_meta = .{ .description = "Select" };
pub fn paste(self: *Self, ctx: Ctx) Result {
return mini_mode_insert_bytes(self, ctx);
}
pub const paste_meta = .{ .arguments = &.{.string} };
};
};
}

View file

@ -214,4 +214,9 @@ const cmds = struct {
self.update_mini_mode_text();
}
pub const mini_mode_history_next_meta = .{ .description = "History next" };
pub fn paste(self: *Self, ctx: Ctx) Result {
return mini_mode_insert_bytes(self, ctx);
}
pub const paste_meta = .{ .arguments = &.{.string} };
};

View file

@ -152,4 +152,9 @@ const cmds = struct {
}
}
pub const mini_mode_delete_backwards_meta = .{ .description = "Delete backwards" };
pub fn paste(self: *Self, ctx: Ctx) Result {
return mini_mode_insert_bytes(self, ctx);
}
pub const paste_meta = .{ .arguments = &.{.string} };
};

View file

@ -339,4 +339,9 @@ const cmds = struct {
return self.cmd_async("toggle_inputview");
}
pub const overlay_toggle_inputview_meta = .{};
pub fn paste(self: *Self, ctx: Ctx) Result {
return overlay_insert_bytes(self, ctx);
}
pub const paste_meta = .{ .arguments = &.{.string} };
};

View file

@ -464,6 +464,11 @@ pub fn Create(options: type) type {
return self.cmd_async("toggle_inputview");
}
pub const overlay_toggle_inputview_meta = .{};
pub fn paste(self: *Self, ctx: Ctx) Result {
return overlay_insert_bytes(self, ctx);
}
pub const paste_meta = .{ .arguments = &.{.string} };
};
};
}