From 9a95de9c742dd8958fe3bdf51a6851bba359b05b Mon Sep 17 00:00:00 2001 From: xconverge Date: Sun, 21 Aug 2016 17:11:50 -0700 Subject: [PATCH] fix #501 some more to include 'k' --- src/actions/actions.ts | 5 +++++ test/mode/modeNormal.test.ts | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/actions/actions.ts b/src/actions/actions.ts index 668af9b8356..82e59ee71f1 100644 --- a/src/actions/actions.ts +++ b/src/actions/actions.ts @@ -1804,6 +1804,11 @@ class MoveUp extends BaseMovement { public async execAction(position: Position, vimState: VimState): Promise { return position.getUp(vimState.desiredColumn); } + + public async execActionForOperator(position: Position, vimState: VimState): Promise { + vimState.currentRegisterMode = RegisterMode.LineWise; + return position.getUp(position.getLineEnd().character); + } } @RegisterAction diff --git a/test/mode/modeNormal.test.ts b/test/mode/modeNormal.test.ts index 5fbb9053c2e..10024b59e36 100644 --- a/test/mode/modeNormal.test.ts +++ b/test/mode/modeNormal.test.ts @@ -197,6 +197,13 @@ suite("Mode Normal", () => { end: ['|33', '44', '55', '66'], }); + newTest({ + title: "Can handle 'dk'", + start: ['11', '22', '33', '44', '55', '|66'], + keysPressed: 'dk', + end: ['11', '22', '33', '|44'], + }); + newTest({ title: "Can handle 'cw'", start: ['text text tex|t'],