Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf960ed

Browse files
committed
Remove unnecessary ensyreLayoutForTextContainer calls and prevented calling it while the text storage is modified.
1 parent1e5858d commitbf960ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎SCXcodeMinimap/SCXcodeMinimapView.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,7 @@ - (void)foldingManager:(DVTFoldingManager *)foldingManager didFoldRange:(NSRange
466466
[(DVTLayoutManager *)self.editorTextView.layoutManagerfoldingManager:foldingManagerdidFoldRange:range];
467467

468468
[self.textView.layoutManager.foldingManagerfoldRange:range];
469-
470-
[self.textView.layoutManagerensureLayoutForTextContainer:self.textView.textContainer];
469+
471470
[selfupdateOffset];
472471
}
473472

@@ -476,8 +475,7 @@ - (void)foldingManager:(DVTFoldingManager *)foldingManager didUnfoldRange:(NSRan
476475
[(DVTLayoutManager *)self.editorTextView.layoutManagerfoldingManager:foldingManagerdidUnfoldRange:range];
477476

478477
[self.textView.layoutManager.foldingManagerunfoldRange:range];
479-
480-
[self.textView.layoutManagerensureLayoutForTextContainer:self.textView.textContainer];
478+
481479
[selfupdateOffset];
482480
}
483481

@@ -621,7 +619,9 @@ - (void)updateSearchResults
621619

622620
- (void)updateOffset
623621
{
624-
[self.editorTextView.layoutManagerensureLayoutForTextContainer:self.editorTextView.textContainer];
622+
if(!self.editorTextView.textStorage.editedMask) {
623+
[self.editorTextView.layoutManagerensureLayoutForTextContainer:self.editorTextView.textContainer];
624+
}
625625

626626
CGFloat editorTextHeight =CGRectGetHeight([self.editorTextView.layoutManagerusedRectForTextContainer:self.editorTextView.textContainer]);
627627
CGFloat adjustedEditorContentHeight = editorTextHeight -CGRectGetHeight(self.editor.scrollView.bounds);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp