[html] auto close triggers on undo/redo and breaks undo/redo history. Fixes #34484

This commit is contained in:
Martin Aeschlimann 2021-09-30 11:10:09 +02:00
parent f94d326e91
commit 801dff2f3b
No known key found for this signature in database
GPG key ID: 2609A01E695523E3

View file

@ -40,7 +40,8 @@ export function activateTagClosing(tagProvider: (document: TextDocument, positio
}
function onDidChangeTextDocument({ document, contentChanges, reason }: TextDocumentChangeEvent) {
if (!isEnabled || contentChanges.length === 0 || reason === TextDocumentChangeReason.Undo) {
console.log('onDidChangeTextDocument', contentChanges, reason);
if (!isEnabled || contentChanges.length === 0 || reason === TextDocumentChangeReason.Undo || reason === TextDocumentChangeReason.Redo) {
return;
}
const activeDocument = window.activeTextEditor && window.activeTextEditor.document;