File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments