[vim] Fix error when dd the only line.

When the buffer has only one line, pressing 'dd' causes CodeMirror to throw an error "There is no line -1 in the document.". Then the cursor behaves in weird way and commands don't work. This can be reproduced in http://codemirror.net/demo/vim.html by keep pressing 'dd'.
Attached change should fix this problem. Tested on Chome 37.0.2062.124, Windows 8.1.