Skip to content

Commit b6b8847

Browse files
committed
Clean some logs
1 parent b5e64eb commit b6b8847

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

SCXcodeMinimap/SCXcodeMinimap.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,25 +233,19 @@ - (NSDictionary *)layoutManager:(NSLayoutManager *)layoutManager shouldUseTempor
233233

234234
- (void)textView:(SCTextView *)textView goAtRelativePosition:(NSPoint)position
235235
{
236-
NSTextView *editorTextView = objc_getAssociatedObject(textView.layoutManager, &kKeyEditorTextView);
237-
238236
NSScrollView *editorScrollView = objc_getAssociatedObject(textView.textContainer, &kKeyEditorScrollView);
239237

240238
CGFloat documentHeight = [editorScrollView.documentView frame].size.height;
241239
CGSize boundsSize = editorScrollView.bounds.size;
242240
CGFloat maxOffset = documentHeight - boundsSize.height;
243241

244-
NSLog(@"Position Y = %f",position.y);
245-
NSLog(@"Document Frame Height = %f", documentHeight);
246-
// NSLog(@"Bounds Height = %f", boundsHeight);
247-
NSLog(@"Max Offset = %f", maxOffset);
248-
249242
CGFloat offset = floor(documentHeight * position.y - boundsSize.height/2);
250243

251244
offset = MIN(MAX(0, offset), maxOffset);
252245

246+
NSTextView *editorTextView = objc_getAssociatedObject(textView.layoutManager, &kKeyEditorTextView);
247+
253248
[editorTextView scrollRectToVisible:NSMakeRect(0, offset, boundsSize.width, boundsSize.height)];
254-
// [editorScrollView.contentView scrollToPoint:NSMakePoint(0,offset)];
255249
}
256250

257251

0 commit comments

Comments
 (0)