IVsTextLinesEvents.OnChangeLineText Method

Notifies the client when the content of a text line in the buffer has changed.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

void OnChangeLineText(
	TextLineChange[] pTextLineChange,
	int fLast
)

Parameters

pTextLineChange
Type: Microsoft.VisualStudio.TextManager.Interop.TextLineChange[]

[in] Pointer to the TextLineChange structure that defines the shape of the old and new text.

fLast
Type: System.Int32

[in] Obsolete; Do not use.

COM Signature

From textmgr.idl:

HRESULT IVsTextLinesEvents::OnChangeLineText(
   [in] const TextLineChange *pTextLineChange,
   [in] BOOL fLast
);

The TextLineChange structure completely describes a text change. This structure describes the results of a replace operation, and defines two spans, as follows:

  • From iStartLine/iStartIndex to iNewEndLine/iNewEndIndex. This span indicates the extent of the newly inserted text in terms of the buffer's current state.

  • From iStartLine/iStartIndex to iOldEndLine/iOldEndIndex. This span describes the extent of the text that was deleted in terms of the buffer's state before the change.

Therefore, the structure contains information about the shape of the region before and after the change. The TextLineChange structure does not contain the old text that was deleted.

Show: