cleanup
This commit is contained in:
parent
8e5ed709a5
commit
a2142c6d3a
3 changed files with 7 additions and 14 deletions
|
|
@ -768,10 +768,10 @@ var statusUpdate = lang.deferredCall(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
env.editor.on("changeStatus", function() {
|
env.editor.on("changeStatus", function() {
|
||||||
statusUpdate.schedule(200);
|
statusUpdate.schedule(50);
|
||||||
});
|
});
|
||||||
env.editor.on("changeSelection", function() {
|
env.editor.on("changeSelection", function() {
|
||||||
statusUpdate.schedule(200);
|
statusUpdate.schedule(50);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -475,6 +475,7 @@ var Editor = function(renderer, session) {
|
||||||
|
|
||||||
this.$highlightBrackets();
|
this.$highlightBrackets();
|
||||||
this.$updateHighlightActiveLine();
|
this.$updateHighlightActiveLine();
|
||||||
|
this._emit("changeSelection");
|
||||||
};
|
};
|
||||||
|
|
||||||
/** internal, hide
|
/** internal, hide
|
||||||
|
|
|
||||||
|
|
@ -390,10 +390,9 @@ module.exports = {
|
||||||
param: true,
|
param: true,
|
||||||
handlesCount: true,
|
handlesCount: true,
|
||||||
nav: function(editor, range, count, param) {
|
nav: function(editor, range, count, param) {
|
||||||
count = parseInt(count, 10) || 1;
|
|
||||||
var ed = editor;
|
var ed = editor;
|
||||||
var cursor = ed.getCursorPosition();
|
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") {
|
if (typeof column === "number") {
|
||||||
ed.selection.clearSelection(); // Why does it select in the first place?
|
ed.selection.clearSelection(); // Why does it select in the first place?
|
||||||
|
|
@ -473,16 +472,9 @@ module.exports = {
|
||||||
editor.selection.selectLineEnd();
|
editor.selection.selectLineEnd();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"0": {
|
"0": new Motion(function(ed) {
|
||||||
nav: function(editor) {
|
return {row: ed.selection.lead.row, column: 0};
|
||||||
var ed = editor;
|
}),
|
||||||
ed.navigateTo(ed.selection.selectionLead.row, 0);
|
|
||||||
},
|
|
||||||
sel: function(editor) {
|
|
||||||
var ed = editor;
|
|
||||||
ed.selectTo(ed.selection.selectionLead.row, 0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"G": {
|
"G": {
|
||||||
nav: function(editor, range, count, param) {
|
nav: function(editor, range, count, param) {
|
||||||
if (!count && count !== 0) { // Stupid JS
|
if (!count && count !== 0) { // Stupid JS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue