Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vim] Fix error when dd the only line. #2839

Merged
merged 1 commit into from Oct 5, 2014
Merged

[vim] Fix error when dd the only line. #2839

merged 1 commit into from Oct 5, 2014

Conversation

blukat29
Copy link
Contributor

@blukat29 blukat29 commented Oct 5, 2014

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.

When the buffer has only one line, pressing 'dd' causes
CodeMirror to throw an error "There is no line -1".
@mightyguava mightyguava merged commit 8288002 into codemirror:master Oct 5, 2014
@blukat29 blukat29 deleted the fix-vim-dd branch October 18, 2014 07:54
@blukat29 blukat29 restored the fix-vim-dd branch November 16, 2015 13:39
@blukat29 blukat29 deleted the fix-vim-dd branch November 16, 2015 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants