Skip to content

Commit 0bc3bc9

Browse files
committed
Fixes #61 and general content offset issues.
1 parent 0790b25 commit 0bc3bc9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

SCXcodeMinimap/SCXcodeMinimapView.m

+5-3
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ - (instancetype)initWithEditor:(IDESourceCodeEditor *)editor
139139

140140
self.textView = [[DVTSourceTextView alloc] init];
141141

142-
// The editor's layout manager needs to be the last one, otherwise live issues don't work
143142
NSTextStorage *storage = self.editorTextView.textStorage;
144-
[storage removeLayoutManager:self.editorTextView.layoutManager];
145143
[self.textView setTextStorage:storage];
146-
[storage addLayoutManager:self.editorTextView.layoutManager];
144+
145+
// The editor's layout manager needs to be the last one, otherwise live issues don't work
146+
DVTLayoutManager *layoutManager = self.editorTextView.layoutManager;
147+
[(NSMutableArray *)storage.layoutManagers removeObject:layoutManager];
148+
[(NSMutableArray *)storage.layoutManagers addObject:layoutManager];
147149

148150
[self.editorTextView.layoutManager.foldingManager setDelegate:self];
149151

0 commit comments

Comments
 (0)