Vim: `yaw` shifts the cursor in certain scenarios

Created on 22 Nov 2017  路  6Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Environment:

  • VSCode Version: 1.18.1
  • VsCodeVim Version: 0.10.5
  • OS: Win10

What happened:
In specific cases, the yaw command will shift the cursor to the left. This case appears to be when the current word is preceded by a space _and_ not followed by a space.

The following case causes the cursor to shift, where | denotes the cursor position:
Start: await |vscode.window
End: await| vscode.window

The following starting scenarios were tested, and do not cause shifting:

  • await(|vscode.window
  • await |vscode window

Similar commands yiw and yw do not exhibit this behavior.

What did you expect to happen:
I expected the cursor to remain in the same location.

How to reproduce it:
Run the scenarios detailed above.

kinbug

Most helpful comment

@jpoon I think the 2 are a bit different. The PR addresses ysaw and yaw space padding. This issue is about cursor movement for yaw.

All 6 comments

Actually, I'm not sure if you addressed this @westim in your PR.

@jpoon I think the 2 are a bit different. The PR addresses ysaw and yaw space padding. This issue is about cursor movement for yaw.

@jpoon that's correct; this was found while I was trying to write tests associated with that PR.

@westim This seems to be the behavior of vim 8.1.22?

Yeah, I don't think this is a bug. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredly picture jaredly  路  3Comments

AndersenJ picture AndersenJ  路  3Comments

ghost picture ghost  路  3Comments

lucastheisen picture lucastheisen  路  3Comments

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments