Skip to content

cursorWordLeft and cursorWordLeftSelect do not behave consistently #74369

@brian-mann

Description

@brian-mann

Issue Type: Bug

Given the following keybindings...

{
  "key": "alt+left",
  "command": "cursorWordLeft",
  "when": "inputFocus"
},
{
  "key": "shift+alt+left",
  "command": "cursorWordLeftSelect",
  "when": "inputFocus"
}

Moving from right to left using cursorWordLeft moves the cursor like so...

this.is.a.test|
this.is.a.|test
this.is.|a.test
this.|is.a.test
|this.is.a.test

This is great - this is exactly what I want.

However moving from right to left with select using cursorWordLeftSelect moves the cursor like so...

this.is.a.test|
this.is.a.|test
this.is.a|.test
this.is.|a.test
this.is|.a.test
this.|is.a.test
this|.is.a.test
|this.is.a.test

It takes 7 keystrokes using select vs the 4 you get with just regular cursor word left.

Note: this bug applies ONLY to moving from right to left. Moving the opposite direction with select works perfectly fine.

VS Code version: Code 1.34.0 (a622c65, 2019-05-15T21:59:22.738Z)
OS version: Darwin x64 18.5.0

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-wordnavEditor word navigation issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions