Ensure ⌘Z / ⇧⌘Z are not sent to file browser when it does not have focus

Since the context menu is outside the normal view/responder hierarchy, it can receive key events even when file browser is not the active view.
This commit is contained in:
Allan Odgaard
2021-02-25 21:21:36 +01:00
parent 755e5ccad7
commit 4d7eeeb383

View File

@@ -488,8 +488,8 @@ static NSMutableIndexSet* MutableLongestCommonSubsequence (NSArray* lhs, NSArray
{ /* -------- */ },
{ @"Finder Tag", .tag = kRequiresSelectionTag, .ref = &finderTagsMenuItem },
{ /* -------- */ },
{ @"Undo", @selector(undo:), @"z" },
{ @"Redo", @selector(redo:), @"z", NSEventModifierFlagCommand|NSEventModifierFlagShift },
{ @"Undo", @selector(undo:) },
{ @"Redo", @selector(redo:) },
{ /* -------- */ },
};
@@ -502,6 +502,8 @@ static NSMutableIndexSet* MutableLongestCommonSubsequence (NSArray* lhs, NSArray
{ @selector(toggleQuickLookPreview:), " " },
{ @selector(copy:), "@c" },
{ @selector(copyAsPathname:), "~@c" },
{ @selector(undo:), "@z" },
{ @selector(redo:), "@Z" },
};
for(NSMenuItem* menuItem in menu.itemArray)