Skip to content

Commit 8fb8e2f

Browse files
committed
Fixes #12
1 parent 5a40fc2 commit 8fb8e2f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

SCXcodeMinimap/SCMiniMapView.m

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,18 @@ - (void)updateTextView
191191
if(mutableAttributedString == nil) {
192192
return;
193193
}
194-
195-
[mutableAttributedString setAttributes:@{NSFontAttributeName: self.font} range:NSMakeRange(0, mutableAttributedString.length)];
194+
195+
__block NSMutableParagraphStyle *style;
196+
[mutableAttributedString enumerateAttribute:NSParagraphStyleAttributeName
197+
inRange:NSMakeRange(0, mutableAttributedString.length)
198+
options:0
199+
usingBlock:^(id value, NSRange range, BOOL *stop) {
200+
style = [value mutableCopy];
201+
}];
202+
[style setTabStops:@[]];
203+
[style setDefaultTabInterval:style.defaultTabInterval * kDefaultZoomLevel];
204+
205+
[mutableAttributedString setAttributes:@{NSFontAttributeName: self.font, NSParagraphStyleAttributeName : style} range:NSMakeRange(0, mutableAttributedString.length)];
196206
[self.textView.textStorage setAttributedString:mutableAttributedString];
197207
[mutableAttributedString release];
198208
}

0 commit comments

Comments
 (0)