Skip to content

Commit ba74df4

Browse files
authored
Merge pull request microsoft#89871 from jeanp413/fix-89857
Fixes cannot undo in SCM input box
2 parents 6a8dc7a + 7c53a18 commit ba74df4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/vs/workbench/contrib/scm/browser/repositoryPane.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,12 @@ export class RepositoryPane extends ViewPane {
769769

770770
// Keep model in sync with API
771771
this.inputModel.setValue(this.repository.input.value);
772-
this._register(this.repository.input.onDidChange(value => this.inputModel.setValue(value)));
772+
this._register(this.repository.input.onDidChange(value => {
773+
if (value === this.inputModel.getValue()) {
774+
return;
775+
}
776+
this.inputModel.setValue(value);
777+
}));
773778

774779
// Keep API in sync with model and update placeholder and validation
775780
toggleClass(placeholderTextContainer, 'hidden', this.inputModel.getValueLength() > 0);

0 commit comments

Comments
 (0)