In order to trigger autocompletion I need to know which text view among opened ones does contain modified text (i.e. not yet saved to disk). How can I check that having IVsTextView and ITextView instances?
I've found the following solution:
IVsTextLines buffer;
if (vsTextView.GetBuffer(out buffer) != VSConstants.S_OK)
{
return false;
}
uint flags;
buffer.GetStateFlags(out flags);
bool isDirty = (flags & (uint)BUFFERSTATEFLAGS.BSF_MODIFIED) != 0;