diff --git a/content_scripts/mode_visual.js b/content_scripts/mode_visual.js index af68d78ed..e5c06c74b 100644 --- a/content_scripts/mode_visual.js +++ b/content_scripts/mode_visual.js @@ -62,6 +62,10 @@ class Movement { // Native word movements behave differently on Linux and Windows, see #1441. So we implement // some of them character-by-character. if ((granularity === vimword) && (direction === forward)) { + if (this.alterMethod === "move") { + this.selection.modify("move", forward, word); + return this.selection.modify("move", forward, character); + } while (this.nextCharacterIsWordCharacter()) { if (this.extendByOneCharacter(forward) === 0) { return; @@ -79,6 +83,11 @@ class Movement { // As above, we implement this character-by-character to get consistent behavior on Windows and // Linux. if ((granularity === word) && (direction === forward)) { + if (this.alterMethod === "move") { + this.selection.modify("move", forward, character); + this.selection.modify("move", forward, word); + return this.selection.modify("move", backward, character); + } while (this.getNextForwardCharacter() && !this.nextCharacterIsWordCharacter()) { if (this.extendByOneCharacter(forward) === 0) { return;