Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[vim] Fix :num and add unit test

  • Loading branch information...
commit 740366d3a2aba3c6d1a3a1affd50ed4d08f1ed05 1 parent 192b2c2
@mightyguava mightyguava authored marijnh committed
Showing with 7 additions and 1 deletion.
  1. +2 −1  keymap/vim.js
  2. +5 −0 test/vim_test.js
View
3  keymap/vim.js
@@ -2543,7 +2543,8 @@
exCommandDispatcher.map(mapArgs[0], mapArgs[1], cm);
},
move: function(cm, params) {
- commandDispatcher.processMotion(cm, getVimState(cm), {
+ commandDispatcher.processCommand(cm, getVimState(cm), {
+ type: 'motion',
motion: 'moveToLineOrEdgeOfDocument',
motionArgs: { forward: false, explicitRepeat: true,
linewise: true },
View
5 test/vim_test.js
@@ -1158,6 +1158,11 @@ testVim('._repeat', function(cm, vim, helpers) {
}, { value: '1 2 3 4 5 6'});
// Ex mode tests
+testVim('ex_go_to_line', function(cm, vim, helpers) {
+ cm.setCursor(0, 0);
+ helpers.doEx('4');
+ helpers.assertCursorAt(3, 0);
+}, { value: 'a\nb\nc\nd\ne\n'});
testVim('ex_write', function(cm, vim, helpers) {
var tmp = CodeMirror.commands.save;
var written;
Please sign in to comment.
Something went wrong with that request. Please try again.