diff --git a/src/actions/actions.ts b/src/actions/actions.ts index 68fe8ce1abb..82ff9bc790a 100644 --- a/src/actions/actions.ts +++ b/src/actions/actions.ts @@ -2357,7 +2357,7 @@ export class MoveWordBegin extends BaseMovement { on a non-blank. This is because "cw" is interpreted as change-word, and a word does not include the following white space. */ - return position.getCurrentWordEnd().getRight(); + return position.getCurrentWordEnd(true).getRight(); } else { return position.getWordRight(); } diff --git a/test/mode/modeNormal.test.ts b/test/mode/modeNormal.test.ts index c0d2fa2b007..7f401009e0f 100644 --- a/test/mode/modeNormal.test.ts +++ b/test/mode/modeNormal.test.ts @@ -212,6 +212,14 @@ suite("Mode Normal", () => { endMode: ModeName.Insert }); + newTest({ + title: "Can handle 'cw' without removing EOL", + start: ['|text;', 'text'], + keysPressed: 'llllcw', + end: ['text|', 'text'], + endMode: ModeName.Insert + }); + newTest({ title: "Can handle 's'", start: ['tex|t'],