Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make C work with registers #3927

Merged
merged 1 commit into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2524,10 +2524,9 @@ class CommandChangeToLineEnd extends BaseCommand {
modes = [ModeName.Normal];
keys = ['C'];
runsOnceForEachCountPrefix = false;
mustBeFirstKey = true;

public async exec(position: Position, vimState: VimState): Promise<VimState> {
let count = vimState.recordedState.count || 1;
const count = vimState.recordedState.count || 1;

return new operator.ChangeOperator().run(
vimState,
Expand Down
8 changes: 8 additions & 0 deletions test/mode/normalModeTests/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ suite('Mode Normal', () => {
endMode: ModeName.Insert,
});

newTest({
title: "Can handle 'NC' and put",
start: ['tex|t', 'one', 'two'],
keysPressed: '"a2C<C-r>a',
end: ['text', 'one|', 'two'],
endMode: ModeName.Insert,
});

newTest({
title: "Can handle 'r'",
start: ['tex|t'],
Expand Down