fix some key navigation issues

This commit is contained in:
Fabian Jakobs 2011-07-19 20:11:44 +02:00
commit b6223bc801
4 changed files with 61 additions and 22 deletions

View file

@ -368,6 +368,26 @@ module.exports = {
selection.moveCursorLineStart();
assert.position(selection.getCursor(), 1, 4);
},
"test go line up when in the middle of the first line should go to document start": function() {
var session = new EditSession("juhu kinners");
var selection = session.getSelection();
selection.moveCursorTo(0, 4);
selection.moveCursorUp();
assert.position(selection.getCursor(), 0, 0);
},
"test go line down when in the middle of the last line should go to document end": function() {
var session = new EditSession("juhu kinners");
var selection = session.getSelection();
selection.moveCursorTo(0, 4);
selection.moveCursorDown();
assert.position(selection.getCursor(), 0, 12);
}
};