vim ctrl-[ should behave exactly as esc

This commit is contained in:
nightwing 2012-09-11 10:03:32 +04:00
commit b9c26bcd78

View file

@ -88,7 +88,9 @@ exports.handler = {
if (hashId == 1)
key = "ctrl-" + key;
if (data.state == "start") {
if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
return {command: coreCommands.stop};
} else if (data.state == "start") {
if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
hashId = -1;
key = data.inputChar;
@ -109,10 +111,7 @@ exports.handler = {
return {command: coreCommands.stop};
}
} else {
if (key == "esc" || key == "ctrl-[") {
data.state = "start";
return {command: coreCommands.stop};
} else if (key == "ctrl-w") {
if (key == "ctrl-w") {
return {command: "removewordleft"};
}
}