diff --git a/ssheven.c b/ssheven.c index 9ae58ee..9884b00 100644 --- a/ssheven.c +++ b/ssheven.c @@ -287,13 +287,13 @@ void ssh_paste(void) void ssh_copy(void) { - OSErr e = ZeroScrap(); - if (e != noErr) printf_i("Failed to ZeroScrap!"); - char* selection = NULL; size_t len = get_selection(&selection); if (selection == NULL || len == 0) return; + OSErr e = ZeroScrap(); + if (e != noErr) printf_i("Failed to ZeroScrap!"); + e = PutScrap(len, 'TEXT', selection); if (e != noErr) printf_i("Failed to PutScrap!"); }