marijnh/CodeMirror — pull request #1503 by abrooks (2013-05-06 01:51:49+00:00)
Title: Vim mode word selection is of by one (affecting `diw`/`daw`/`diW`/`daW`)

There are several variants of the bug but, most basically, if you have this text and are sitting on "A":

```foo bAr baz```

And you execute `diw`, you'll get:

```foo r baz```

Instead of:

```foo baz```

This issue affects all of the following delete motions: `diw`, `daw`, `diW`, `daW` as well as their change (`ciw`...), yank (`yiw`...) and visual (`viw`...) variations.

I created 28 tests covering various edge cases (26 cases fail without the patch) and all now pass. lint was happy as well.

Let me know if there's anything you'd like me to change — style, completeness or otherwise.

Thanks!