Skip to content

Commit 6e59516

Browse files
committed
prevent crash CTRL-W #989
1 parent 442eda3 commit 6e59516

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

XVim/IDEWorkspaceTabController+XVim.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,18 @@ static inline BOOL xvim_horizontallyStackingModeForMode(GeniusLayoutMode mode) {
6363
@implementation IDEWorkspaceTabController (XVim)
6464

6565
- (NSArray*)xvim_allEditorArea{
66+
#ifdef XCODE8_AND_LOWER
6667
NSMutableArray* otherViews = [[NSMutableArray alloc] init];
6768
for( IDEViewController* c in [self _keyboardFocusAreas] ){
6869
if( [[[c class] description] isEqualToString:@"IDEEditorContext"] ){
6970
[otherViews addObject:c];
7071
}
7172
}
7273
return otherViews;
74+
#else
75+
// _keyboardFocusAreas is not defined in Xcode8
76+
return @[];
77+
#endif
7378
}
7479

7580
-(GeniusLayoutMode)xvim_currentLayout

0 commit comments

Comments
 (0)