Skip to content

Commit

Permalink
[draft] Fix for window navigation on xcode 8 beta 3
Browse files Browse the repository at this point in the history
- IDEWTC `_keyboardFocusAreas` had its signature changed to
  `_keyboardFocusAreas:`, so I'm just making a naive selector check to
  call the correct one.
- Would be nice to import the new headers and call the correct selector,
  but generating the header files seems to be troublesome (see issue XVimProject#621).

Sharing this just as draft solution for people that want to use it
temporarily.
  • Loading branch information
marlonandrade committed Jul 27, 2016
1 parent 3eb09a6 commit 1d4b30c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion XVim/IDEWorkspaceTabController+XVim.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,18 @@ static inline BOOL xvim_horizontallyStackingModeForMode(GeniusLayoutMode mode) {

@implementation IDEWorkspaceTabController (XVim)

- (id)xvim_keyboardFocusAreas {
if ([self respondsToSelector:@selector(_keyboardFocusAreas)]) {
return [self performSelector:@selector(_keyboardFocusAreas)];
} else if ([self respondsToSelector:@selector(_keyboardFocusAreas:)]) {
return [self performSelector:@selector(_keyboardFocusAreas:) withObject:@YES];
}
return nil;
}

- (NSArray*)xvim_allEditorArea{
NSMutableArray* otherViews = [[NSMutableArray alloc] init];
for( IDEViewController* c in [self _keyboardFocusAreas] ){
for( IDEViewController* c in [self xvim_keyboardFocusAreas] ){
if( [[[c class] description] isEqualToString:@"IDEEditorContext"] ){
[otherViews addObject:c];
}
Expand Down

0 comments on commit 1d4b30c

Please sign in to comment.