mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Do not use ‘autorecalculatesKeyViewLoop’ for chooser windows
Instead we manually call recalculatesKeyViewLoop on the window. This is because the auto-recalculation messes up. First time the window is brought up, it works fine, but the second time, nextValidKeyView will return ‘nil’ for the last view (causing the key view loop to not be a loop).
This commit is contained in:
@@ -100,10 +100,9 @@ NSMutableAttributedString* CreateAttributedStringWithMarkedUpRanges (std::string
|
||||
[_window setContentBorderThickness:23 forEdge:NSMinYEdge];
|
||||
[[_window standardWindowButton:NSWindowMiniaturizeButton] setHidden:YES];
|
||||
[[_window standardWindowButton:NSWindowZoomButton] setHidden:YES];
|
||||
_window.autorecalculatesKeyViewLoop = YES;
|
||||
_window.delegate = self;
|
||||
_window.level = NSFloatingWindowLevel;
|
||||
_window.releasedWhenClosed = NO;
|
||||
_window.delegate = self;
|
||||
_window.level = NSFloatingWindowLevel;
|
||||
_window.releasedWhenClosed = NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -125,6 +124,7 @@ NSMutableAttributedString* CreateAttributedStringWithMarkedUpRanges (std::string
|
||||
|
||||
- (void)showWindow:(id)sender
|
||||
{
|
||||
[_window recalculateKeyViewLoop];
|
||||
[_window makeKeyAndOrderFront:self];
|
||||
[_window makeFirstResponder:_searchField];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user