fix: move system_paste command to mainview so it can be used when on editor is open

This commit is contained in:
CJ van den Berg 2024-11-17 22:01:10 +01:00
parent e69960c6d4
commit ed843a9baf
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 8 additions and 6 deletions

View file

@ -2098,12 +2098,6 @@ pub const Editor = struct {
}
pub const paste_meta = .{ .description = "Paste from internal clipboard" };
pub fn system_paste(self: *Self, _: Context) Result {
if (builtin.os.tag == .windows) return self.paste(.{});
tui.current().rdr.request_system_clipboard();
}
pub const system_paste_meta = .{ .description = "Paste from system clipboard" };
pub fn delete_forward(self: *Self, _: Context) Result {
const b = try self.buf_for_update();
const root = try self.delete_to(move_cursor_right, b.root, b.allocator);