mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Merge pull request #89871 from jeanp413/fix-89857
Fixes cannot undo in SCM input box
This commit is contained in:
commit
ba74df45d3
|
@ -769,7 +769,12 @@ export class RepositoryPane extends ViewPane {
|
||||||
|
|
||||||
// Keep model in sync with API
|
// Keep model in sync with API
|
||||||
this.inputModel.setValue(this.repository.input.value);
|
this.inputModel.setValue(this.repository.input.value);
|
||||||
this._register(this.repository.input.onDidChange(value => this.inputModel.setValue(value)));
|
this._register(this.repository.input.onDidChange(value => {
|
||||||
|
if (value === this.inputModel.getValue()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.inputModel.setValue(value);
|
||||||
|
}));
|
||||||
|
|
||||||
// Keep API in sync with model and update placeholder and validation
|
// Keep API in sync with model and update placeholder and validation
|
||||||
toggleClass(placeholderTextContainer, 'hidden', this.inputModel.getValueLength() > 0);
|
toggleClass(placeholderTextContainer, 'hidden', this.inputModel.getValueLength() > 0);
|
||||||
|
|
Loading…
Reference in a new issue