ITextBuffer textBuffer = _textView.TextBuffer;
var span = _textView.TextSnapshot;
IReadOnlyRegion region;
using (IReadOnlyRegionEdit edit = textBuffer.CreateReadOnlyRegionEdit())
{
region = edit.CreateReadOnlyRegion(new Span(0, edit.Snapshot.Length), SpanTrackingMode.EdgeNegative, EdgeInsertionMode.Allow);
edit.Apply();
}
以上是在当前文档插入一个region的代码,e文网站是这样的,但是我实际运行不会插入region,求解.