Skip to content

Commit

Permalink
fix: #25
Browse files Browse the repository at this point in the history
  • Loading branch information
bendera committed Jan 28, 2021
1 parent ed00d04 commit f9b618d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/dev-assets/vscodeApiMocked.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const config = {
defaultView: 'text',
visibleViews: 'both',
showRecentCommits: true,
saveAndClose: false,
saveAndClose: true,
},
};

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/cme-form-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ export class FormView extends connect(store)(LitElement) {
private _handleSuccessButtonClick() {
if (this._amendCbChecked) {
store.dispatch(confirmAmend(this._compileTemplate()));
}
if (this._saveAndClose) {
} else if (this._saveAndClose) {
store.dispatch(copyToSCMInputBox(this._compileTemplate()));
store.dispatch(closeTab());
} else {
store.dispatch(copyToSCMInputBox(this._compileTemplate()));
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/cme-text-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class TextView extends connect(store)(LitElement) {
if (this._amendCbChecked) {
store.dispatch(confirmAmend(this._inputBoxValue));
} else if (this._saveAndClose) {
store.dispatch(copyToSCMInputBox(this._inputBoxValue));
store.dispatch(closeTab());
} else {
store.dispatch(copyToSCMInputBox(this._inputBoxValue));
Expand Down

0 comments on commit f9b618d

Please sign in to comment.