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)

Syntax

'Declaration
Sub OnChangeLineText ( _
    pTextLineChange As TextLineChange(), _
    fLast As Integer _
)
void OnChangeLineText(
    TextLineChange[] pTextLineChange,
    int fLast
)
void OnChangeLineText(
    [InAttribute] array<TextLineChange>^ pTextLineChange, 
    [InAttribute] int fLast
)
abstract OnChangeLineText : 
        pTextLineChange:TextLineChange[] * 
        fLast:int -> unit
function OnChangeLineText(
    pTextLineChange : TextLineChange[], 
    fLast : int
)

Parameters

Remarks

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.

.NET Framework Security

See Also

Reference

IVsTextLinesEvents Interface

Microsoft.VisualStudio.TextManager.Interop Namespace