fix #1834 vim mode issues
This commit is contained in:
parent
9e182a1de7
commit
d05213cd92
4 changed files with 20 additions and 2 deletions
|
|
@ -164,6 +164,7 @@ var actions = exports.actions = {
|
||||||
fn: function(editor, range, count, param) {
|
fn: function(editor, range, count, param) {
|
||||||
var options = editor.getLastSearchOptions();
|
var options = editor.getLastSearchOptions();
|
||||||
options.backwards = false;
|
options.backwards = false;
|
||||||
|
options.start = null;
|
||||||
|
|
||||||
editor.selection.moveCursorRight();
|
editor.selection.moveCursorRight();
|
||||||
editor.selection.clearSelection();
|
editor.selection.clearSelection();
|
||||||
|
|
@ -180,6 +181,7 @@ var actions = exports.actions = {
|
||||||
fn: function(editor, range, count, param) {
|
fn: function(editor, range, count, param) {
|
||||||
var options = editor.getLastSearchOptions();
|
var options = editor.getLastSearchOptions();
|
||||||
options.backwards = true;
|
options.backwards = true;
|
||||||
|
options.start = null;
|
||||||
|
|
||||||
editor.findPrevious(options);
|
editor.findPrevious(options);
|
||||||
ensureScrollMargin(editor);
|
ensureScrollMargin(editor);
|
||||||
|
|
@ -497,7 +499,8 @@ var inputBuffer = exports.inputBuffer = {
|
||||||
else if (selectable) {
|
else if (selectable) {
|
||||||
repeat(function() {
|
repeat(function() {
|
||||||
run(motionObj.sel);
|
run(motionObj.sel);
|
||||||
operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
|
operators[o.ch].fn(editor, editor.getSelectionRange(),
|
||||||
|
o.count, motionObj.param ? motionObj : param);
|
||||||
}, o.count || 1);
|
}, o.count || 1);
|
||||||
}
|
}
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,10 @@ module.exports = {
|
||||||
case "W":
|
case "W":
|
||||||
editor.selection.selectAWord();
|
editor.selection.selectAWord();
|
||||||
break;
|
break;
|
||||||
|
case ")":
|
||||||
|
case "}":
|
||||||
|
case "]":
|
||||||
|
param = editor.session.$brackets[param];
|
||||||
case "(":
|
case "(":
|
||||||
case "{":
|
case "{":
|
||||||
case "[":
|
case "[":
|
||||||
|
|
@ -656,7 +660,8 @@ module.exports = {
|
||||||
pos.column = line.length;
|
pos.column = line.length;
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
isLine: true
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ module.exports = {
|
||||||
fn: function(editor, range, count, param) {
|
fn: function(editor, range, count, param) {
|
||||||
count = count || 1;
|
count = count || 1;
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
case param.isLine && param:
|
||||||
case "y":
|
case "y":
|
||||||
var pos = editor.getCursorPosition();
|
var pos = editor.getCursorPosition();
|
||||||
editor.selection.selectLine();
|
editor.selection.selectLine();
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,15 @@ var Keys = (function() {
|
||||||
|
|
||||||
// workaround for firefox bug
|
// workaround for firefox bug
|
||||||
ret[173] = '-';
|
ret[173] = '-';
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var mods = ["cmd", "ctrl", "alt", "shift"];
|
||||||
|
for (var i = Math.pow(2, mods.length); i--;) {
|
||||||
|
ret.KEY_MODS[i] = mods.filter(function(x) {
|
||||||
|
return i & ret.KEY_MODS[x];
|
||||||
|
}).join("-") + "-";
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var mods = ["cmd", "ctrl", "alt", "shift"];
|
var mods = ["cmd", "ctrl", "alt", "shift"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue