mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
@@ -57,9 +57,10 @@ import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
|||||||
import { Emitter } from 'vs/base/common/event';
|
import { Emitter } from 'vs/base/common/event';
|
||||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||||
|
import { RedoCommand, UndoCommand } from 'vs/editor/browser/editorExtensions';
|
||||||
|
|
||||||
export const NOTEBOOK_SELECTOR: string = 'notebook-component';
|
export const NOTEBOOK_SELECTOR: string = 'notebook-component';
|
||||||
|
const PRIORITY = 105;
|
||||||
@Component({
|
@Component({
|
||||||
selector: NOTEBOOK_SELECTOR,
|
selector: NOTEBOOK_SELECTOR,
|
||||||
templateUrl: decodeURI(require.toUrl('./notebook.component.html'))
|
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() {
|
ngOnInit() {
|
||||||
|
|||||||
Reference in New Issue
Block a user