File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ - (void)toggleMinimap:(NSMenuItem *)sender
247
247
{
248
248
BOOL shouldDisplayMinimap = [[[NSUserDefaults standardUserDefaults ] objectForKey: SCXcodeMinimapShouldDisplayKey] boolValue ];
249
249
250
- [sender setTitle: (shouldDisplayMinimap ? kHideMinimapMenuItemTitle : kShowMinimapMenuItemTitle )];
250
+ [sender setTitle: (! shouldDisplayMinimap ? kHideMinimapMenuItemTitle : kShowMinimapMenuItemTitle )];
251
251
[[NSUserDefaults standardUserDefaults ] setObject: @(!shouldDisplayMinimap) forKey: SCXcodeMinimapShouldDisplayKey];
252
252
[[NSNotificationCenter defaultCenter ] postNotificationName: SCXcodeMinimapShouldDisplayChangeNotification object: nil ];
253
253
}
Original file line number Diff line number Diff line change @@ -221,6 +221,10 @@ - (instancetype)initWithEditor:(IDESourceCodeEditor *)editor
221
221
222
222
- (void )viewDidMoveToWindow
223
223
{
224
+ if (self.window == nil ) {
225
+ return ;
226
+ }
227
+
224
228
[self setVisible: [[[NSUserDefaults standardUserDefaults ] objectForKey: SCXcodeMinimapShouldDisplayKey] boolValue ]];
225
229
}
226
230
@@ -231,7 +235,6 @@ - (void)setVisible:(BOOL)visible
231
235
self.hidden = !visible;
232
236
233
237
[self updateSize ];
234
- [self updateOffset ];
235
238
236
239
[self .textView.layoutManager setDelegate: (self .hidden ? nil : self )];
237
240
@@ -516,12 +519,16 @@ - (void)updateSize
516
519
517
520
CGFloat actualZoomLevel = CGRectGetWidth (self.bounds ) / CGRectGetWidth (self.editor .textView .bounds );
518
521
[self .scrollView setMagnification: actualZoomLevel];
522
+
523
+ [self updateOffset ];
519
524
}
520
525
521
526
- (void )resizeWithOldSuperviewSize : (NSSize )oldSize
522
527
{
523
528
[super resizeWithOldSuperviewSize: oldSize];
524
529
530
+ self.shouldAllowFullSyntaxHighlight = NO ;
531
+
525
532
CGRect frame = self.textView .bounds ;
526
533
frame.size .width = CGRectGetWidth (self.editorTextView .bounds );
527
534
[self .textView setFrame: frame];
You can’t perform that action at this time.
0 commit comments