Skip to content

Commit

Permalink
add TextDocument#isClosed, #15723
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Mar 24, 2017
1 parent 18d7a48 commit 77d0808
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ declare module 'vscode' {
readonly version: number;

/**
* true if there are unpersisted changes.
* `true` if there are unpersisted changes.
*/
readonly isDirty: boolean;

/**
* `true` if the document have been closed. A closed document isn't synchronized anymore
* and won't be re-used when the same resource is opened again.
*/
readonly isClosed: boolean;

/**
* Save the underlying file.
*
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/node/extHostDocumentData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class ExtHostDocumentData extends MirrorModel2 {
get isUntitled() { return data._uri.scheme !== 'file'; },
get languageId() { return data._languageId; },
get version() { return data._versionId; },
get isClosed() { return data._isDisposed; },
get isDirty() { return data._isDirty; },
save() { return data._save(); },
getText(range?) { return range ? data._getTextInRange(range) : data.getText(); },
Expand Down

0 comments on commit 77d0808

Please sign in to comment.