Fixes #1783
This commit is contained in:
parent
811d63039d
commit
e751389d38
2 changed files with 12 additions and 7 deletions
|
|
@ -481,10 +481,17 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
"$": {
|
||||
nav: function(editor) {
|
||||
handlesCount: true,
|
||||
nav: function(editor, range, count, param) {
|
||||
if (count > 1) {
|
||||
editor.navigateDown(count-1);
|
||||
}
|
||||
editor.navigateLineEnd();
|
||||
},
|
||||
sel: function(editor) {
|
||||
sel: function(editor, range, count, param) {
|
||||
if (count > 1) {
|
||||
editor.selection.moveCursorBy(count-1, 0);
|
||||
}
|
||||
editor.selection.selectLineEnd();
|
||||
}
|
||||
},
|
||||
|
|
@ -660,5 +667,7 @@ module.exports.up = module.exports.k;
|
|||
module.exports.down = module.exports.j;
|
||||
module.exports.pagedown = module.exports["ctrl-d"];
|
||||
module.exports.pageup = module.exports["ctrl-u"];
|
||||
module.exports.home = module.exports["0"];
|
||||
module.exports.end = module.exports["$"];
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ addTest("Word movement [PARTIAL]", "03", "1", function() {
|
|||
*/
|
||||
});
|
||||
|
||||
addTest("Moving to the start or end of a line [PARTIAL]", "03", "2", function() {
|
||||
addTest("Moving to the start or end of a line", "03", "2", function() {
|
||||
var text = " This is a line with example text";
|
||||
var textLength = text.length;
|
||||
initEditor(text);
|
||||
|
|
@ -259,22 +259,18 @@ addTest("Moving to the start or end of a line [PARTIAL]", "03", "2", function()
|
|||
assertPosition(0, 36);
|
||||
sendKeys("0");
|
||||
assertPosition(0, 0);
|
||||
/* "End" and "Home" fails
|
||||
sendKeys("End");
|
||||
assertPosition(0, 36);
|
||||
sendKeys("Home");
|
||||
assertPosition(0, 0);
|
||||
*/
|
||||
sendKeys("^");
|
||||
assertPosition(0, 5);
|
||||
sendKeys("$^");
|
||||
assertPosition(0, 5);
|
||||
sendKeys("ddaA young intelligent turtle\nFound programming UNIX a hurdle", "Esc", "k0");
|
||||
assertPosition(0, 0);
|
||||
/* <count>$ fails
|
||||
sendKeys("2$");
|
||||
assertPosition(1, 30);
|
||||
*/
|
||||
});
|
||||
|
||||
addTest("Moving to a character [PARTIAL]", "03", "3", function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue