fix: paste command

This commit is contained in:
CJ van den Berg 2024-11-22 11:12:34 +01:00
parent 73b7031693
commit 0f509df2d4
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 3 additions and 8 deletions

View file

@ -283,9 +283,9 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) !void {
return;
}
if (try m.match(.{ "system_clipboard", tp.string })) {
if (self.active_event_handler()) |eh|
eh.send(tp.self_pid(), m) catch |e| self.logger.err("clipboard handler", e);
if (try m.match(.{ "system_clipboard", tp.extract(&text) })) {
try self.dispatch_flush_input_event();
try command.executeName("paste", command.fmt(.{text}));
return;
}