共用方式為


IVsCompoundAction.FlushEditActions 方法

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
Function FlushEditActions As Integer
int FlushEditActions()
int FlushEditActions()
abstract FlushEditActions : unit -> int
function FlushEditActions() : int

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

HRESULT IVsCompoundAction::FlushEditActions();

一般來說,不同的文字層 (大綱、 文字換行,等等) 的更新會保留完,當CloseCompoundAction呼叫。 如此一來,不過,在用戶端無法進行一些變更,然後呼叫環境,以擷取之前插入號位置到CloseCompoundAction呼叫。 因為未更新文字圖層,環境會提供不正確的資訊。

若要避免這個問題,請使用FlushEditActions。 當用戶端會呼叫這個方法時,環境會執行的更新程式會利用CloseCompoundAction。 這些更新也會完成CloseCompoundAction

.NET Framework 安全性

請參閱

參考

IVsCompoundAction 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間