未验证 提交 20ccfb07 编写于 作者: J Joao Moreno

scm: make commit template work again

上级 51c0c5d1
......@@ -606,7 +606,7 @@ export class RepositoryPane extends ViewPane {
private menus: SCMMenus;
private toggleViewModelModeAction: ToggleViewModeAction | undefined;
protected contextKeyService: IContextKeyService;
// private commitTemplate = '';
private commitTemplate = '';
constructor(
readonly repository: ISCMRepository,
......@@ -984,20 +984,21 @@ export class RepositoryPane extends ViewPane {
.filter(r => !!r && !isSCMResourceGroup(r))! as any;
}
// TODO@joao
private onDidChangeCommitTemplate(): void {
// if (typeof this.repository.provider.commitTemplate === 'undefined' || !this.repository.input.visible) {
// return;
// }
if (typeof this.repository.provider.commitTemplate === 'undefined' || !this.repository.input.visible) {
return;
}
const oldCommitTemplate = this.commitTemplate;
this.commitTemplate = this.repository.provider.commitTemplate;
// const oldCommitTemplate = this.commitTemplate;
// this.commitTemplate = this.repository.provider.commitTemplate;
const value = this.inputModel.getValue();
// if (this.inputBox.value && this.inputBox.value !== oldCommitTemplate) {
// return;
// }
if (value && value !== oldCommitTemplate) {
return;
}
// this.inputBox.value = this.commitTemplate;
this.inputModel.setValue(this.commitTemplate);
}
private updateInputBoxVisibility(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册