Merge remote-tracking branch 'remotes/origin/master'
This commit is contained in:
commit
af09dc7f05
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();
|
editor.navigateLineEnd();
|
||||||
},
|
},
|
||||||
sel: function(editor) {
|
sel: function(editor, range, count, param) {
|
||||||
|
if (count > 1) {
|
||||||
|
editor.selection.moveCursorBy(count-1, 0);
|
||||||
|
}
|
||||||
editor.selection.selectLineEnd();
|
editor.selection.selectLineEnd();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -660,5 +667,7 @@ module.exports.up = module.exports.k;
|
||||||
module.exports.down = module.exports.j;
|
module.exports.down = module.exports.j;
|
||||||
module.exports.pagedown = module.exports["ctrl-d"];
|
module.exports.pagedown = module.exports["ctrl-d"];
|
||||||
module.exports.pageup = module.exports["ctrl-u"];
|
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 text = " This is a line with example text";
|
||||||
var textLength = text.length;
|
var textLength = text.length;
|
||||||
initEditor(text);
|
initEditor(text);
|
||||||
|
|
@ -259,22 +259,18 @@ addTest("Moving to the start or end of a line [PARTIAL]", "03", "2", function()
|
||||||
assertPosition(0, 36);
|
assertPosition(0, 36);
|
||||||
sendKeys("0");
|
sendKeys("0");
|
||||||
assertPosition(0, 0);
|
assertPosition(0, 0);
|
||||||
/* "End" and "Home" fails
|
|
||||||
sendKeys("End");
|
sendKeys("End");
|
||||||
assertPosition(0, 36);
|
assertPosition(0, 36);
|
||||||
sendKeys("Home");
|
sendKeys("Home");
|
||||||
assertPosition(0, 0);
|
assertPosition(0, 0);
|
||||||
*/
|
|
||||||
sendKeys("^");
|
sendKeys("^");
|
||||||
assertPosition(0, 5);
|
assertPosition(0, 5);
|
||||||
sendKeys("$^");
|
sendKeys("$^");
|
||||||
assertPosition(0, 5);
|
assertPosition(0, 5);
|
||||||
sendKeys("ddaA young intelligent turtle\nFound programming UNIX a hurdle", "Esc", "k0");
|
sendKeys("ddaA young intelligent turtle\nFound programming UNIX a hurdle", "Esc", "k0");
|
||||||
assertPosition(0, 0);
|
assertPosition(0, 0);
|
||||||
/* <count>$ fails
|
|
||||||
sendKeys("2$");
|
sendKeys("2$");
|
||||||
assertPosition(1, 30);
|
assertPosition(1, 30);
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
addTest("Moving to a character [PARTIAL]", "03", "3", function() {
|
addTest("Moving to a character [PARTIAL]", "03", "3", function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue