mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
hook native undo/redo with notebook
This commit is contained in:
@@ -663,7 +663,7 @@ suite('notebook undo redo', () => {
|
||||
|
||||
|
||||
// undo should bring back the deleted cell, and revert to previous content and selection
|
||||
await vscode.commands.executeCommand('notebook.undo');
|
||||
await vscode.commands.executeCommand('undo');
|
||||
assert.equal(vscode.notebook.activeNotebookEditor!.document.cells.length, 3);
|
||||
assert.equal(vscode.notebook.activeNotebookEditor!.document.cells.indexOf(vscode.notebook.activeNotebookEditor!.selection!), 1);
|
||||
assert.equal(vscode.notebook.activeNotebookEditor?.selection?.document.getText(), 'var abc = 0;');
|
||||
@@ -729,7 +729,7 @@ suite('notebook undo redo', () => {
|
||||
assert.equal(cellOutputsAddedRet.cells[0].outputs.length, 1);
|
||||
|
||||
const cellOutputClear = getEventOncePromise<vscode.NotebookCellOutputsChangeEvent>(vscode.notebook.onDidChangeCellOutputs);
|
||||
await vscode.commands.executeCommand('notebook.undo');
|
||||
await vscode.commands.executeCommand('undo');
|
||||
const cellOutputsCleardRet = await cellOutputClear;
|
||||
assert.deepEqual(cellOutputsCleardRet, {
|
||||
document: vscode.notebook.activeNotebookEditor!.document,
|
||||
|
||||
Reference in New Issue
Block a user