diff --git a/frontend/dev-assets/vscodeApiMocked.js b/frontend/dev-assets/vscodeApiMocked.js index 63cfeea..68a8914 100644 --- a/frontend/dev-assets/vscodeApiMocked.js +++ b/frontend/dev-assets/vscodeApiMocked.js @@ -214,7 +214,7 @@ const config = { defaultView: 'text', visibleViews: 'both', showRecentCommits: true, - saveAndClose: false, + saveAndClose: true, }, }; diff --git a/frontend/src/components/cme-form-view.ts b/frontend/src/components/cme-form-view.ts index 070cefd..4ab7734 100644 --- a/frontend/src/components/cme-form-view.ts +++ b/frontend/src/components/cme-form-view.ts @@ -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())); diff --git a/frontend/src/components/cme-text-view.ts b/frontend/src/components/cme-text-view.ts index 7d6f4bc..7185e6d 100644 --- a/frontend/src/components/cme-text-view.ts +++ b/frontend/src/components/cme-text-view.ts @@ -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));