diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-08-06 14:25:43 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-08-06 14:25:43 -0400 |
commit | ff0c5af5dbf9f121051bb5c4947bfcc9ba455799 (patch) | |
tree | 83ac7d5fbee838e5839ad8b209ba07508d8e3a2e /common/content/modes.js | |
parent | 48d1109f6a49e1f9a969e9efb1024e2a74c19721 (diff) | |
download | pentadactyl-ff0c5af5dbf9f121051bb5c4947bfcc9ba455799.tar.gz |
Don't derive Text Edit mode from Operator mode. Allow escaping from Operator mode.
Diffstat (limited to 'common/content/modes.js')
-rw-r--r-- | common/content/modes.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/common/content/modes.js b/common/content/modes.js index 1bc25320..1ea298da 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -66,7 +66,7 @@ var Modes = Module("modes", { char: "v", description: "Active when text is selected", display: function () "VISUAL" + (this._extended & modes.LINE ? " LINE" : ""), - bases: [this.COMMAND, this.OPERATOR], + bases: [this.COMMAND], ownsFocus: true }, { leave: function (stack, newMode) { @@ -102,7 +102,7 @@ var Modes = Module("modes", { this.addMode("TEXT_EDIT", { char: "t", description: "Vim-like editing of input elements", - bases: [this.OPERATOR, this.COMMAND], + bases: [this.COMMAND], ownsFocus: true }, { onKeyPress: function (eventList) { @@ -452,8 +452,7 @@ var Modes = Module("modes", { while (this._modeStack.length > 1 && this.main != mode) { let a = this._modeStack.pop(); this.set(this.topOfStack.main, this.topOfStack.extended, this.topOfStack.params, - update({ pop: a }, - args || {})); + update({ pop: a }, args)); if (mode == null) return; @@ -595,10 +594,10 @@ var Modes = Module("modes", { "Return to Normal mode", function () { modes.reset(); }); - mappings.add([modes.INPUT, modes.COMMAND, modes.PASS_THROUGH, modes.QUOTE], + mappings.add([modes.INPUT, modes.COMMAND, modes.OPERATOR, modes.PASS_THROUGH, modes.QUOTE], ["<Esc>", "<C-[>"], "Return to the previous mode", - function () { modes.pop(); }); + function () { modes.pop(null, { fromEscape: true }); }); mappings.add([modes.MENU], ["<C-c>"], "Leave Menu mode", |