SCM - fix SCMInput regression (#197910)

This commit is contained in:
Ladislau Szomoru 2023-11-10 11:52:22 +01:00 committed by GitHub
parent 1ac02aacf6
commit 87d6b26100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1739,11 +1739,8 @@ class SCMInputWidget {
return;
}
if (currentValue !== '') {
this.inputEditor.pushUndoStop();
}
this.inputEditor.executeEdits(null, [EditOperation.replace(textModel.getFullModelRange(), value)]);
this.inputEditor.pushUndoStop();
textModel.pushStackElement();
textModel.pushEditOperations(null, [EditOperation.replaceMove(textModel.getFullModelRange(), value)], () => []);
const position = reason === SCMInputChangeReason.HistoryPrevious
? textModel.getFullModelRange().getStartPosition()