[vim] fix left/right motions
This commit is contained in:
parent
989f318d87
commit
92e4a42f89
3 changed files with 7 additions and 4 deletions
|
|
@ -96,7 +96,7 @@ exports.handler = {
|
||||||
key = data.inputChar;
|
key = data.inputChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hashId == -1 || hashId == 1) {
|
if (hashId == -1 || hashId == 1 || hashId == 0 && key.length > 1) {
|
||||||
if (cmds.inputBuffer.idle && startCommands[key])
|
if (cmds.inputBuffer.idle && startCommands[key])
|
||||||
return startCommands[key];
|
return startCommands[key];
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,11 @@ module.exports = {
|
||||||
|
|
||||||
"l": {
|
"l": {
|
||||||
nav: function(editor) {
|
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) {
|
sel: function(editor) {
|
||||||
var pos = editor.getCursorPosition();
|
var pos = editor.getCursorPosition();
|
||||||
|
|
@ -575,7 +579,6 @@ module.exports = {
|
||||||
nav: function(editor, range, count, param) {
|
nav: function(editor, range, count, param) {
|
||||||
editor.selection.clearSelection();
|
editor.selection.clearSelection();
|
||||||
keepScrollPosition(editor, editor.gotoPageUp);
|
keepScrollPosition(editor, editor.gotoPageUp);
|
||||||
|
|
||||||
},
|
},
|
||||||
sel: function(editor, range, count, param) {
|
sel: function(editor, range, count, param) {
|
||||||
keepScrollPosition(editor, editor.selectPageUp);
|
keepScrollPosition(editor, editor.selectPageUp);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ oop.inherits(Worker, Mirror);
|
||||||
ruleNames.forEach(function(x) {
|
ruleNames.forEach(function(x) {
|
||||||
delete all[x];
|
delete all[x];
|
||||||
});
|
});
|
||||||
console.log(all)
|
|
||||||
this.ruleset = all;
|
this.ruleset = all;
|
||||||
}
|
}
|
||||||
this.doc.getValue() && this.deferredUpdate.schedule(100);
|
this.doc.getValue() && this.deferredUpdate.schedule(100);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue