Skip to content
Snippets Groups Projects
Commit 9eed17c4 authored by George Nachman's avatar George Nachman
Browse files

Fix a bug where a hotkey window that has only a double-tap but not a hotkey

will open when you press 'a'.
parent d40c14de
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -71,9 +71,7 @@
BOOL hasModifierActivation = [iTermProfilePreferences boolForKey:KEY_HOTKEY_ACTIVATE_WITH_MODIFIER inProfile:profile];
iTermHotKeyModifierActivation modifierActivation = [iTermProfilePreferences unsignedIntegerForKey:KEY_HOTKEY_MODIFIER_ACTIVATION inProfile:profile];
NSArray<iTermShortcut *> *shortcuts = [[iTermShortcut shortcutsForProfile:profile] filteredArrayUsingBlock:^BOOL(iTermShortcut *anObject) {
return anObject.isAssigned;
}];
NSArray<iTermShortcut *> *shortcuts = [iTermShortcut shortcutsForProfile:profile];
if (!shortcuts.count) {
DLog(@"None of the shortcuts in profile %@ are assigned", profile[KEY_NAME]);
 
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ extern CGFloat kShortcutPreferredHeight;
// Takes a dictionary like the one produced by -[iTermShortcut dictionaryValue].
+ (instancetype)shortcutWithDictionary:(NSDictionary *)dictionary;
 
// Returns all shortcuts for a profile.
// Returns assigned shortcuts for a profile.
+ (NSArray<iTermShortcut *> *)shortcutsForProfile:(Profile *)profile;
 
// Returns the shortcut for a keydown event.
Loading
Loading
Loading
Loading
@@ -94,7 +94,9 @@ const NSEventModifierFlags kHotKeyModifierMask = (NSCommandKeyMask |
[result addObjectsFromArray:[additional mapWithBlock:^id(NSDictionary *anObject) {
return [self shortcutWithDictionary:anObject];
}]];
return result;
return [result filteredArrayUsingBlock:^BOOL(iTermShortcut *anObject) {
return anObject.isAssigned;
}];
}
 
+ (instancetype)shortcutWithDictionary:(NSDictionary *)dictionary {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment