void OnTextDocumentDisposed(object sender, TextDocumentEventArgs e) { if (e.TextDocument.TextBuffer == this.TextBuffer) { Close(); } } #endregion