Skip to content

Commit a96098e

Browse files
committed
Fixes microsoft#99167: Do not check for unusual line terminators when undoing
1 parent 74bc00f commit a96098e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ class UnusualLineTerminatorsDetector extends Disposable implements IEditorContri
4848
this._checkForUnusualLineTerminators();
4949
}));
5050

51-
this._register(this._editor.onDidChangeModelContent(() => {
51+
this._register(this._editor.onDidChangeModelContent((e) => {
52+
if (e.isUndoing) {
53+
// skip checking in case of undoing
54+
return;
55+
}
5256
this._checkForUnusualLineTerminators();
5357
}));
5458
}

0 commit comments

Comments
 (0)