mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 17:23:19 -05:00
@@ -57,9 +57,10 @@ import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { RedoCommand, UndoCommand } from 'vs/editor/browser/editorExtensions';
|
||||
|
||||
export const NOTEBOOK_SELECTOR: string = 'notebook-component';
|
||||
|
||||
const PRIORITY = 105;
|
||||
@Component({
|
||||
selector: NOTEBOOK_SELECTOR,
|
||||
templateUrl: decodeURI(require.toUrl('./notebook.component.html'))
|
||||
@@ -133,6 +134,18 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
}
|
||||
}
|
||||
}));
|
||||
this._register(RedoCommand.addImplementation(PRIORITY, 'notebook-cells-undo-redo', () => {
|
||||
if (this._model) {
|
||||
this._model.redo();
|
||||
}
|
||||
return false;
|
||||
}));
|
||||
this._register(UndoCommand.addImplementation(PRIORITY, 'notebook-cells-undo-redo', () => {
|
||||
if (this._model) {
|
||||
this._model.undo();
|
||||
}
|
||||
return false;
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
Reference in New Issue
Block a user