Skip to content

Commit

Permalink
Fixes #61 and general content offset issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Jul 20, 2015
1 parent 0790b25 commit 0bc3bc9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SCXcodeMinimap/SCXcodeMinimapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ - (instancetype)initWithEditor:(IDESourceCodeEditor *)editor

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

// The editor's layout manager needs to be the last one, otherwise live issues don't work
NSTextStorage *storage = self.editorTextView.textStorage;
[storage removeLayoutManager:self.editorTextView.layoutManager];
[self.textView setTextStorage:storage];
[storage addLayoutManager:self.editorTextView.layoutManager];

// The editor's layout manager needs to be the last one, otherwise live issues don't work
DVTLayoutManager *layoutManager = self.editorTextView.layoutManager;
[(NSMutableArray *)storage.layoutManagers removeObject:layoutManager];
[(NSMutableArray *)storage.layoutManagers addObject:layoutManager];

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

Expand Down

0 comments on commit 0bc3bc9

Please sign in to comment.