Skip to content

Commit

Permalink
fixes #1214 (#1217)
Browse files Browse the repository at this point in the history
  • Loading branch information
Platzer authored and johnfn committed Jan 10, 2017
1 parent 701d013 commit 9d2d71a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2703,7 +2703,7 @@ class CommandDeleteToLineEnd extends BaseCommand {
}

@RegisterAction
class CommandYankFullLine extends BaseCommand {
export class CommandYankFullLine extends BaseCommand {
modes = [ModeName.Normal];
keys = ["Y"];

Expand Down
7 changes: 4 additions & 3 deletions src/register/register.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { VimState, RecordedState } from './../mode/modeHandler';
import * as clipboard from 'copy-paste';
import { YankOperator, BaseOperator, CommandRegister, DeleteOperator } from './../actions/actions';
import { YankOperator, CommandYankFullLine, BaseOperator, BaseCommand, CommandRegister, DeleteOperator } from './../actions/actions';
import * as vscode from "vscode";

/**
Expand Down Expand Up @@ -261,10 +261,11 @@ export class Register {
private static ProcessNumberedRegister(content: RegisterContent, vimState: VimState): void {
// Find the BaseOperator of the current actions
const baseOperator = vimState.recordedState.actionsRun.find( (value) => {
return value instanceof BaseOperator;
return value instanceof BaseOperator ||
value instanceof BaseCommand;
});

if (baseOperator instanceof YankOperator) {
if (baseOperator instanceof YankOperator || baseOperator instanceof CommandYankFullLine) {
// 'yank' to 0 only if no register was specified
const registerCommand = vimState.recordedState.actionsRun.find( (value) => {
return value instanceof CommandRegister;
Expand Down

0 comments on commit 9d2d71a

Please sign in to comment.