Skip to content

Commit

Permalink
Fixed bug #613
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Platzer committed Aug 18, 2016
1 parent 98f6604 commit 4f000ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd_line/commands/writequit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export class WriteQuitCommand extends node.CommandBase {

// Writing command. Taken as a basis from the "write.ts" file.
execute(modeHandler : ModeHandler) : void {
var filename : RegExp = new RegExp("Untitled-[0-9]*");
if (!this.activeTextEditor.document.isDirty) {
if (filename.test(this.activeTextEditor.document.fileName)) {
if (this.activeTextEditor.document.isDirty) {

if (this.activeTextEditor.document.isUntitled) {
vscode.commands.executeCommand("workbench.action.files.saveAs");
} else {
vscode.commands.executeCommand("workbench.action.files.save");
Expand Down

0 comments on commit 4f000ad

Please sign in to comment.