Skip to content

Commit b356870

Browse files
committed
Preventing content offset changes while the textStorage is editing (#76)
1 parent 768ed66 commit b356870

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SCXcodeMinimap/SCXcodeMinimapView.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,11 @@ - (void)updateOffset
633633
[self.selectionView setFrame:selectionViewFrame];
634634
return;
635635
}
636-
636+
637+
if(self.editorTextView.textStorage.editedMask) {
638+
return;
639+
}
640+
637641
CGFloat editorYOffset = CGRectGetMinY(self.editor.scrollView.contentView.bounds) + ABS(CGRectGetMinY(self.editorTextView.frame));
638642

639643
CGFloat ratio = (adjustedMinimapContentHeight / adjustedEditorContentHeight) * (1 / self.scrollView.magnification);

0 commit comments

Comments
 (0)