This commit is contained in:
nightwing 2012-08-22 20:02:25 +04:00
commit a2142c6d3a
3 changed files with 7 additions and 14 deletions

View file

@ -768,10 +768,10 @@ var statusUpdate = lang.deferredCall(function() {
});
env.editor.on("changeStatus", function() {
statusUpdate.schedule(200);
statusUpdate.schedule(50);
});
env.editor.on("changeSelection", function() {
statusUpdate.schedule(200);
statusUpdate.schedule(50);
});

View file

@ -475,6 +475,7 @@ var Editor = function(renderer, session) {
this.$highlightBrackets();
this.$updateHighlightActiveLine();
this._emit("changeSelection");
};
/** internal, hide

View file

@ -390,10 +390,9 @@ module.exports = {
param: true,
handlesCount: true,
nav: function(editor, range, count, param) {
count = parseInt(count, 10) || 1;
var ed = editor;
var cursor = ed.getCursorPosition();
var column = util.getLeftNthChar(editor, cursor, param, count);
var column = util.getLeftNthChar(editor, cursor, param, count || 1);
if (typeof column === "number") {
ed.selection.clearSelection(); // Why does it select in the first place?
@ -473,16 +472,9 @@ module.exports = {
editor.selection.selectLineEnd();
}
},
"0": {
nav: function(editor) {
var ed = editor;
ed.navigateTo(ed.selection.selectionLead.row, 0);
},
sel: function(editor) {
var ed = editor;
ed.selectTo(ed.selection.selectionLead.row, 0);
}
},
"0": new Motion(function(ed) {
return {row: ed.selection.lead.row, column: 0};
}),
"G": {
nav: function(editor, range, count, param) {
if (!count && count !== 0) { // Stupid JS