mirror of https://github.com/cy384/ssheven.git
don't clear the scrap on copy if there's nothing selected
This commit is contained in:
parent
51c41578e7
commit
df1e5769e9
|
@ -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!");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue