この問題の解決策を見つけました。管理対象オブジェクトのコンテキストを保存する前に、テキストビューの「状態」(選択した範囲とスクロール位置)を保存します
NSRange selectedRange = [self.textView selectedRange];
NSScrollView* scrollView = [self.textView enclosingScrollView];
// get the current scroll position of the document view
NSPoint scrollPosition = [[scrollView contentView] bounds].origin;
エンティティを保存した後、選択した範囲とスクロール位置を復元します
[self.textView setSelectedRange:selectedRange];
// restore the scroll location
[[scrollView contentView] scrollToPoint: scrollPosition];
[scrollView reflectScrolledClipView: [scrollView contentView]];
スクロールビューのスクロール位置を設定するための2つの可能な解決策を見つけました