Partager via


IVsTextLinesEvents.OnChangeLineText(TextLineChange[], Int32) Method

Definition

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

public:
 void OnChangeLineText(cli::array <Microsoft::VisualStudio::TextManager::Interop::TextLineChange> ^ pTextLineChange, int fLast);
public:
 void OnChangeLineText(Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextLineChange> ^ pTextLineChange, int fLast);
void OnChangeLineText(std::Array <Microsoft::VisualStudio::TextManager::Interop::TextLineChange> const & pTextLineChange, int fLast);
public void OnChangeLineText (Microsoft.VisualStudio.TextManager.Interop.TextLineChange[] pTextLineChange, int fLast);
abstract member OnChangeLineText : Microsoft.VisualStudio.TextManager.Interop.TextLineChange[] * int -> unit
Public Sub OnChangeLineText (pTextLineChange As TextLineChange(), fLast As Integer)

Parameters

pTextLineChange
TextLineChange[]

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

fLast
Int32

[in] Obsolete; Do not use.

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.

Applies to