提交 d685a125 编写于 作者: R rebornix

fix #50689. Populate cursorUndo in command palette.

上级 ef280ab0
......@@ -4,8 +4,9 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as nls from 'vs/nls';
import { Selection } from 'vs/editor/common/core/selection';
import { registerEditorCommand, ServicesAccessor, EditorCommand, registerEditorContribution } from 'vs/editor/browser/editorExtensions';
import { ServicesAccessor, registerEditorContribution, EditorAction, registerEditorAction } from 'vs/editor/browser/editorExtensions';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { Disposable } from 'vs/base/common/lifecycle';
import { IEditorContribution, ScrollType } from 'vs/editor/common/editorCommon';
......@@ -108,10 +109,12 @@ export class CursorUndoController extends Disposable implements IEditorContribut
}
}
export class CursorUndo extends EditorCommand {
export class CursorUndo extends EditorAction {
constructor() {
super({
id: 'cursorUndo',
label: nls.localize('cursor.undo', "Remove Selection of Last Find Match"),
alias: 'Remove Selection of Last Find Match',
precondition: null,
kbOpts: {
kbExpr: EditorContextKeys.textInputFocus,
......@@ -120,10 +123,10 @@ export class CursorUndo extends EditorCommand {
});
}
public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
public run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
CursorUndoController.get(editor).cursorUndo();
}
}
registerEditorContribution(CursorUndoController);
registerEditorCommand(new CursorUndo());
registerEditorAction(CursorUndo);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册