private void OnChanged(TextSnapshot newSnapshot, Span newSpan, Span oldSpan)
		{
			var oldSnapshot = _currentSnapshot;
			_currentSnapshot = newSnapshot;
			if (Changed != null)
				Changed(this, new TextChangeArgs(oldSnapshot, oldSpan, newSnapshot, newSpan));
		}
コード例 #2
0
ファイル: TextBuffer.cs プロジェクト: ly774508966/CodeEditor
        private void OnChanged(TextSnapshot newSnapshot, Span newSpan, Span oldSpan)
        {
            var oldSnapshot = _currentSnapshot;

            _currentSnapshot = newSnapshot;
            if (Changed != null)
            {
                Changed(this, new TextChangeArgs(oldSnapshot, oldSpan, newSnapshot, newSpan));
            }
        }
コード例 #3
0
ファイル: TextBuffer.cs プロジェクト: ly774508966/CodeEditor
 private TextBuffer(IPiece <char> text, IContentType contentType)
 {
     ContentType      = contentType;
     _currentSnapshot = new TextSnapshot(this, PieceTable.ForPiece(text));
 }
		private TextBuffer(IPiece<char> text, IContentType contentType)
		{
			ContentType = contentType;
			_currentSnapshot = new TextSnapshot(this, PieceTable.ForPiece(text));
		}