Skip to content

Commit

Permalink
prevent crash CTRL-W #989
Browse files Browse the repository at this point in the history
  • Loading branch information
pebble8888 committed Jan 9, 2017
1 parent 442eda3 commit 6e59516
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions XVim/IDEWorkspaceTabController+XVim.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,18 @@ static inline BOOL xvim_horizontallyStackingModeForMode(GeniusLayoutMode mode) {
@implementation IDEWorkspaceTabController (XVim)

- (NSArray*)xvim_allEditorArea{
#ifdef XCODE8_AND_LOWER
NSMutableArray* otherViews = [[NSMutableArray alloc] init];
for( IDEViewController* c in [self _keyboardFocusAreas] ){
if( [[[c class] description] isEqualToString:@"IDEEditorContext"] ){
[otherViews addObject:c];
}
}
return otherViews;
#else
// _keyboardFocusAreas is not defined in Xcode8
return @[];
#endif
}

-(GeniusLayoutMode)xvim_currentLayout
Expand Down

0 comments on commit 6e59516

Please sign in to comment.