[vim] fix left/right motions

This commit is contained in:
nightwing 2012-11-30 22:26:00 +04:00
commit 92e4a42f89
3 changed files with 7 additions and 4 deletions

View file

@ -96,7 +96,7 @@ exports.handler = {
key = data.inputChar;
}
if (hashId == -1 || hashId == 1) {
if (hashId == -1 || hashId == 1 || hashId == 0 && key.length > 1) {
if (cmds.inputBuffer.idle && startCommands[key])
return startCommands[key];
return {

View file

@ -222,7 +222,11 @@ module.exports = {
"l": {
nav: function(editor) {
editor.navigateRight();
var pos = editor.getCursorPosition();
var col = pos.column;
var lineLen = editor.session.getLine(pos.row).length;
if (lineLen && col !== lineLen)
editor.navigateRight();
},
sel: function(editor) {
var pos = editor.getCursorPosition();
@ -575,7 +579,6 @@ module.exports = {
nav: function(editor, range, count, param) {
editor.selection.clearSelection();
keepScrollPosition(editor, editor.gotoPageUp);
},
sel: function(editor, range, count, param) {
keepScrollPosition(editor, editor.selectPageUp);

View file

@ -68,7 +68,7 @@ oop.inherits(Worker, Mirror);
ruleNames.forEach(function(x) {
delete all[x];
});
console.log(all)
this.ruleset = all;
}
this.doc.getValue() && this.deferredUpdate.schedule(100);