atom/vim-mode — pull request #301 by iamjwc (2014-06-05 04:28:53+00:00)
Title: Cursor no longer goes past end of line

On master, your cursor can find its way past the end of the line if you move up or down to a line longer than your cursor's current column.

![before-move-down](https://cloud.githubusercontent.com/assets/4146/3183348/bd04421c-ec68-11e3-92ba-bf0d45d73605.gif)

Now, when you move down, it respects the end of the next line.

![after-move-down](https://cloud.githubusercontent.com/assets/4146/3183355/dee3077e-ec68-11e3-9d42-58dce7addb67.gif)

If you're asking why I didn't just simply `moveLeft` if I detect that the cursor is past the end of the line, that is because then further vertical movements could be in the incorrect column. For an example of this, please see the spec `"remembers the position it column it was in after moving to shorter line"`. An added bonus of implementing it this way is that now when you move to the end of the line with `$`, further vertical movements stay in the last column.

I'm not crazy about having to set `@editor.desiredCursorColumn = null` before every other occurrence of moving the cursor, and I'm sure I've missed something here, but I hope someone else has a good idea. If not, I've got a future pull request that will address this a bit more.