Skip to content

Commit 9095051

Browse files
committed
Speed improvements #5 #6
1 parent 4b578fa commit 9095051

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

SCXcodeMinimap/SCMiniMapView.m

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,24 @@ - (NSTextView *)textView
5454
_textView = [[NSTextView alloc] initWithFrame:self.bounds];
5555
[_textView setAutoresizingMask: NSViewMinXMargin | NSViewMaxXMargin | NSViewWidthSizable | NSViewHeightSizable];
5656
[_textView.textContainer setLineFragmentPadding:0.0f];
57-
[_textView setSelectable:NO];
57+
5858
[_textView.layoutManager setDelegate:self];
59+
[_textView.layoutManager setAllowsNonContiguousLayout:YES];
60+
[_textView.layoutManager setBackgroundLayoutEnabled:YES];
61+
62+
[_textView setAllowsUndo:NO];
63+
[_textView setAllowsImageEditing:NO];
64+
[_textView setAutomaticDashSubstitutionEnabled:NO];
65+
[_textView setAutomaticDataDetectionEnabled:NO];
66+
[_textView setAutomaticLinkDetectionEnabled:NO];
67+
[_textView setAutomaticQuoteSubstitutionEnabled:NO];
68+
[_textView setAutomaticSpellingCorrectionEnabled:NO];
69+
[_textView setAutomaticTextReplacementEnabled:NO];
70+
[_textView setContinuousSpellCheckingEnabled:NO];
71+
[_textView setDisplaysLinkToolTips:NO];
72+
[_textView setEditable:NO];
73+
[_textView setRichText:YES];
74+
[_textView setSelectable:NO];
5975

6076
[self setDocumentView:_textView];
6177

@@ -189,7 +205,6 @@ - (NSDictionary *)layoutManager:(NSLayoutManager *)layoutManager shouldUseTempor
189205

190206
#pragma mark - Navigation
191207

192-
193208
- (void)mouseUp:(NSEvent *)theEvent
194209
{
195210
[super mouseUp:theEvent];

0 commit comments

Comments
 (0)