Skip to content

Commit a4ea216

Browse files
authored
Add macOS version check for window behavior
Wrap setting collection behavior in a version check for macOS 10.7 or later.
1 parent 655983b commit a4ea216

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/MacVim/MMFindReplaceController.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ - (void)showWithText:(NSString *)text flags:(int)flags
3333

3434
// Set collection behavior to ensure the dialog appears in the current
3535
// space rather than jumping to another space.
36-
NSWindowCollectionBehavior wcb = window.collectionBehavior;
37-
wcb |= NSWindowCollectionBehaviorMoveToActiveSpace;
38-
[window setCollectionBehavior:wcb];
36+
if (AVAILABLE_MAC_OS(10, 7)) {
37+
NSWindowCollectionBehavior wcb = window.collectionBehavior;
38+
wcb |= NSWindowCollectionBehaviorMoveToActiveSpace;
39+
[window setCollectionBehavior:wcb];
40+
}
3941

4042
if (text && [text length] > 0)
4143
[findBox setStringValue:text];

0 commit comments

Comments
 (0)