fix some key navigation issues
This commit is contained in:
parent
742f04b407
commit
b6223bc801
4 changed files with 61 additions and 22 deletions
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue