未验证 提交 8031bfdf 编写于 作者: A Alex Dima

Add test for #90973

上级 9caab0bf
......@@ -2880,6 +2880,33 @@ suite('Editor Controller - Cursor Configuration', () => {
model.dispose();
});
test('issue #90973: Undo brings back model alternative version', () => {
let model = createTextModel(
[
''
].join('\n'),
{
insertSpaces: false,
}
);
withTestCodeEditor(null, { model: model }, (editor, cursor) => {
const beforeVersion = model.getVersionId();
const beforeAltVersion = model.getAlternativeVersionId();
cursorCommand(cursor, H.Type, { text: 'Hello' }, 'keyboard');
cursorCommand(cursor, H.Undo, {});
const afterVersion = model.getVersionId();
const afterAltVersion = model.getAlternativeVersionId();
assert.notEqual(beforeVersion, afterVersion);
assert.equal(beforeAltVersion, afterAltVersion);
});
model.dispose();
});
});
suite('Editor Controller - Indentation Rules', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册