Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1187,16 +1187,21 @@ - (void)processBezelKeyDown:(NSEvent *)theEvent {
case 's': case 'S': // Save / Save-and-delete
{
bool success = [flycutOperator saveFromStack];
[self performSelector:@selector(hideApp) withObject:nil afterDelay:0.2];
[self restoreStashedStoreAndUpdate];

if ( success ) {
if ( modifiers & NSEventModifierFlagShift ) {
[flycutOperator clearItemAtStackPosition];
[self updateBezel];
[self updateMenu];
}
// Delete while the store that was saved from is still the current one.
// -restoreStashedStore swaps the store AND the stack position back, so
// deleting after it removed an entry from the main list - at whatever
// position the user had been at there - instead of the clipping that had
// just been saved. Saving a favorite therefore destroyed an unrelated
// clipping.
if ( success && ( modifiers & NSEventModifierFlagShift ) ) {
[flycutOperator clearItemAtStackPosition];
[self updateBezel];
[self updateMenu];
}

[self performSelector:@selector(hideApp) withObject:nil afterDelay:0.2];
[self restoreStashedStoreAndUpdate];
}
break;
case 'f':
Expand Down