Skip to content

Commit 9b75202

Browse files
committed
a few fixes for bugs encountered during demo prep
1 parent d5cbba1 commit 9b75202

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/plugins/handlers.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ function handlers(app, opts, done){
129129

130130
workspace.updateFilename(filename)
131131
.then(() => workspace.saveFile(filename, content))
132+
.then(() => userConfig.set('last-file', filename))
132133
.then(function(){
133134
documents.swap(path.join(cwd, filename));
134135
handleActionQueue();
@@ -148,8 +149,13 @@ function handlers(app, opts, done){
148149
return;
149150
}
150151

152+
const { cwd } = workspace.getState();
153+
151154
// TODO: switch userConfig last-file
152155
workspace.deleteFile(filename)
156+
.then(function(){
157+
documents.remove(path.join(cwd, filename));
158+
})
153159
.then(newFile);
154160
}
155161

0 commit comments

Comments
 (0)