File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 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
247247{
248248 BOOL shouldDisplayMinimap = [[[NSUserDefaults standardUserDefaults ] objectForKey: SCXcodeMinimapShouldDisplayKey] boolValue ];
249249
250- [sender setTitle: (shouldDisplayMinimap ? kHideMinimapMenuItemTitle : kShowMinimapMenuItemTitle )];
250+ [sender setTitle: (! shouldDisplayMinimap ? kHideMinimapMenuItemTitle : kShowMinimapMenuItemTitle )];
251251 [[NSUserDefaults standardUserDefaults ] setObject: @(!shouldDisplayMinimap) forKey: SCXcodeMinimapShouldDisplayKey];
252252 [[NSNotificationCenter defaultCenter ] postNotificationName: SCXcodeMinimapShouldDisplayChangeNotification object: nil ];
253253}
Original file line number Diff line number Diff line change @@ -221,6 +221,10 @@ - (instancetype)initWithEditor:(IDESourceCodeEditor *)editor
221221
222222- (void )viewDidMoveToWindow
223223{
224+ if (self.window == nil ) {
225+ return ;
226+ }
227+
224228 [self setVisible: [[[NSUserDefaults standardUserDefaults ] objectForKey: SCXcodeMinimapShouldDisplayKey] boolValue ]];
225229}
226230
@@ -231,7 +235,6 @@ - (void)setVisible:(BOOL)visible
231235 self.hidden = !visible;
232236
233237 [self updateSize ];
234- [self updateOffset ];
235238
236239 [self .textView.layoutManager setDelegate: (self .hidden ? nil : self )];
237240
@@ -516,12 +519,16 @@ - (void)updateSize
516519
517520 CGFloat actualZoomLevel = CGRectGetWidth (self.bounds ) / CGRectGetWidth (self.editor .textView .bounds );
518521 [self .scrollView setMagnification: actualZoomLevel];
522+
523+ [self updateOffset ];
519524}
520525
521526- (void )resizeWithOldSuperviewSize : (NSSize )oldSize
522527{
523528 [super resizeWithOldSuperviewSize: oldSize];
524529
530+ self.shouldAllowFullSyntaxHighlight = NO ;
531+
525532 CGRect frame = self.textView .bounds ;
526533 frame.size .width = CGRectGetWidth (self.editorTextView .bounds );
527534 [self .textView setFrame: frame];
You can’t perform that action at this time.
0 commit comments