共用方式為


IVsCompoundAction.FlushEditActions Method

Definition

Updates the various text layers (outlining, word wrap, and so on) when called.

public:
 int FlushEditActions();
public:
 int FlushEditActions();
int FlushEditActions();
public int FlushEditActions ();
abstract member FlushEditActions : unit -> int
Public Function FlushEditActions () As Integer

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsCompoundAction::FlushEditActions();  

Typically, updates to the various text layers (outlining, word wrap, and so on) are left to the very end, when CloseCompoundAction is called. In this case, however, a client could make some changes and then call into the environment to retrieve the caret position before CloseCompoundAction is called. Because the text layers have not been updated, the environment would provide inaccurate information.

To avoid this problem, use FlushEditActions. When a client calls this method, the environment performs the updates that are done with CloseCompoundAction. These updates are also done in CloseCompoundAction.

Applies to