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) {
|
||||
var options = editor.getLastSearchOptions();
|
||||
options.backwards = false;
|
||||
options.start = null;
|
||||
|
||||
editor.selection.moveCursorRight();
|
||||
editor.selection.clearSelection();
|
||||
|
|
@ -180,6 +181,7 @@ var actions = exports.actions = {
|
|||
fn: function(editor, range, count, param) {
|
||||
var options = editor.getLastSearchOptions();
|
||||
options.backwards = true;
|
||||
options.start = null;
|
||||
|
||||
editor.findPrevious(options);
|
||||
ensureScrollMargin(editor);
|
||||
|
|
@ -497,7 +499,8 @@ var inputBuffer = exports.inputBuffer = {
|
|||
else if (selectable) {
|
||||
repeat(function() {
|
||||
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);
|
||||
}
|
||||
this.reset();
|
||||
|
|
|
|||
|
|
@ -350,6 +350,10 @@ module.exports = {
|
|||
case "W":
|
||||
editor.selection.selectAWord();
|
||||
break;
|
||||
case ")":
|
||||
case "}":
|
||||
case "]":
|
||||
param = editor.session.$brackets[param];
|
||||
case "(":
|
||||
case "{":
|
||||
case "[":
|
||||
|
|
@ -656,7 +660,8 @@ module.exports = {
|
|||
pos.column = line.length;
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
},
|
||||
isLine: true
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ module.exports = {
|
|||
fn: function(editor, range, count, param) {
|
||||
count = count || 1;
|
||||
switch (param) {
|
||||
case param.isLine && param:
|
||||
case "y":
|
||||
var pos = editor.getCursorPosition();
|
||||
editor.selection.selectLine();
|
||||
|
|
|
|||
|
|
@ -133,6 +133,15 @@ var Keys = (function() {
|
|||
|
||||
// workaround for firefox bug
|
||||
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() {
|
||||
var mods = ["cmd", "ctrl", "alt", "shift"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue