File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -466,8 +466,7 @@ - (void)foldingManager:(DVTFoldingManager *)foldingManager didFoldRange:(NSRange
466466 [(DVTLayoutManager *)self .editorTextView.layoutManager foldingManager: foldingManager didFoldRange: range];
467467
468468 [self .textView.layoutManager.foldingManager foldRange: range];
469-
470- [self .textView.layoutManager ensureLayoutForTextContainer: self .textView.textContainer];
469+
471470 [self updateOffset ];
472471}
473472
@@ -476,8 +475,7 @@ - (void)foldingManager:(DVTFoldingManager *)foldingManager didUnfoldRange:(NSRan
476475 [(DVTLayoutManager *)self .editorTextView.layoutManager foldingManager: foldingManager didUnfoldRange: range];
477476
478477 [self .textView.layoutManager.foldingManager unfoldRange: range];
479-
480- [self .textView.layoutManager ensureLayoutForTextContainer: self .textView.textContainer];
478+
481479 [self updateOffset ];
482480}
483481
@@ -621,7 +619,9 @@ - (void)updateSearchResults
621619
622620- (void )updateOffset
623621{
624- [self .editorTextView.layoutManager ensureLayoutForTextContainer: self .editorTextView.textContainer];
622+ if (!self.editorTextView .textStorage .editedMask ) {
623+ [self .editorTextView.layoutManager ensureLayoutForTextContainer: self .editorTextView.textContainer];
624+ }
625625
626626 CGFloat editorTextHeight = CGRectGetHeight ([self .editorTextView.layoutManager usedRectForTextContainer: self .editorTextView.textContainer]);
627627 CGFloat adjustedEditorContentHeight = editorTextHeight - CGRectGetHeight (self.editor .scrollView .bounds );
You can’t perform that action at this time.
0 commit comments