Skip to content

Commit 4eef9fa

Browse files
committed
Fixes microsoft#18252: Misspelled command names: Carret → Caret
1 parent 2e2b47a commit 4eef9fa

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/vs/editor/browser/editor.all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import 'vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace';
2222
import 'vs/editor/contrib/inPlaceReplace/common/inPlaceReplace';
2323
import 'vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard';
2424
import 'vs/editor/contrib/linesOperations/common/linesOperations';
25-
import 'vs/editor/contrib/carretOperations/common/carretOperations';
25+
import 'vs/editor/contrib/caretOperations/common/caretOperations';
2626
import 'vs/editor/contrib/links/browser/links';
2727
import 'vs/editor/contrib/multicursor/common/multicursor';
2828
import 'vs/editor/contrib/multicursor/browser/menuPreventer';

src/vs/editor/contrib/carretOperations/common/carretOperations.ts renamed to src/vs/editor/contrib/caretOperations/common/caretOperations.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import * as nls from 'vs/nls';
88
import { ICommand, ICommonCodeEditor, EditorContextKeys } from 'vs/editor/common/editorCommon';
99
import { IActionOptions, editorAction, EditorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions';
10-
import { MoveCarretCommand } from './moveCarretCommand';
10+
import { MoveCaretCommand } from './moveCaretCommand';
1111

12-
class MoveCarretAction extends EditorAction {
12+
class MoveCaretAction extends EditorAction {
1313

1414
private left: boolean;
1515

@@ -25,32 +25,32 @@ class MoveCarretAction extends EditorAction {
2525
var selections = editor.getSelections();
2626

2727
for (var i = 0; i < selections.length; i++) {
28-
commands.push(new MoveCarretCommand(selections[i], this.left));
28+
commands.push(new MoveCaretCommand(selections[i], this.left));
2929
}
3030

3131
editor.executeCommands(this.id, commands);
3232
}
3333
}
3434

3535
@editorAction
36-
class MoveCarretLeftAction extends MoveCarretAction {
36+
class MoveCaretLeftAction extends MoveCaretAction {
3737
constructor() {
3838
super(true, {
3939
id: 'editor.action.moveCarretLeftAction',
40-
label: nls.localize('carret.moveLeft', "Move Carret Left"),
41-
alias: 'Move Carret Left',
40+
label: nls.localize('caret.moveLeft', "Move Caret Left"),
41+
alias: 'Move Caret Left',
4242
precondition: EditorContextKeys.Writable
4343
});
4444
}
4545
}
4646

4747
@editorAction
48-
class MoveCarretRightAction extends MoveCarretAction {
48+
class MoveCaretRightAction extends MoveCaretAction {
4949
constructor() {
5050
super(false, {
5151
id: 'editor.action.moveCarretRightAction',
52-
label: nls.localize('carret.moveRight', "Move Carret Right"),
53-
alias: 'Move Carret Right',
52+
label: nls.localize('caret.moveRight', "Move Caret Right"),
53+
alias: 'Move Caret Right',
5454
precondition: EditorContextKeys.Writable
5555
});
5656
}

src/vs/editor/contrib/carretOperations/common/moveCarretCommand.ts renamed to src/vs/editor/contrib/caretOperations/common/moveCaretCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Range } from 'vs/editor/common/core/range';
88
import { Selection } from 'vs/editor/common/core/selection';
99
import { ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon';
1010

11-
export class MoveCarretCommand implements ICommand {
11+
export class MoveCaretCommand implements ICommand {
1212

1313
private _selection: Selection;
1414
private _isMovingLeft: boolean;

src/vs/editor/contrib/carretOperations/test/common/moveCarretCommand.test.ts renamed to src/vs/editor/contrib/caretOperations/test/common/moveCarretCommand.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
'use strict';
66

77
import { Selection } from 'vs/editor/common/core/selection';
8-
import { MoveCarretCommand } from 'vs/editor/contrib/carretOperations/common/moveCarretCommand';
8+
import { MoveCaretCommand } from 'vs/editor/contrib/caretOperations/common/moveCaretCommand';
99
import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils';
1010

1111

12-
function testMoveCarretLeftCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
13-
testCommand(lines, null, selection, (sel) => new MoveCarretCommand(sel, true), expectedLines, expectedSelection);
12+
function testMoveCaretLeftCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
13+
testCommand(lines, null, selection, (sel) => new MoveCaretCommand(sel, true), expectedLines, expectedSelection);
1414
}
1515

16-
function testMoveCarretRightCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
17-
testCommand(lines, null, selection, (sel) => new MoveCarretCommand(sel, false), expectedLines, expectedSelection);
16+
function testMoveCaretRightCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
17+
testCommand(lines, null, selection, (sel) => new MoveCaretCommand(sel, false), expectedLines, expectedSelection);
1818
}
1919

20-
suite('Editor Contrib - Move Carret Command', () => {
20+
suite('Editor Contrib - Move Caret Command', () => {
2121

2222
test('move selection to left', function () {
23-
testMoveCarretLeftCommand(
23+
testMoveCaretLeftCommand(
2424
[
2525
'012345'
2626
],
@@ -32,7 +32,7 @@ suite('Editor Contrib - Move Carret Command', () => {
3232
);
3333
});
3434
test('move selection to right', function () {
35-
testMoveCarretRightCommand(
35+
testMoveCaretRightCommand(
3636
[
3737
'012345'
3838
],
@@ -44,7 +44,7 @@ suite('Editor Contrib - Move Carret Command', () => {
4444
);
4545
});
4646
test('move selection to left - from first column - no change', function () {
47-
testMoveCarretLeftCommand(
47+
testMoveCaretLeftCommand(
4848
[
4949
'012345'
5050
],
@@ -56,7 +56,7 @@ suite('Editor Contrib - Move Carret Command', () => {
5656
);
5757
});
5858
test('move selection to right - from last column - no change', function () {
59-
testMoveCarretRightCommand(
59+
testMoveCaretRightCommand(
6060
[
6161
'012345'
6262
],

0 commit comments

Comments
 (0)