1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 22:47:59 +01:00

Prevent endless TEXTAREA->INSERT->TEXTAREA mode stacking.

--HG--
branch : mode-refactoring
This commit is contained in:
Doug Kearns
2010-10-09 04:18:59 +11:00
parent ce10a9af13
commit c3f977cf74

View File

@@ -611,7 +611,12 @@ const Editor = Module("editor", {
mappings.add([modes.INSERT], mappings.add([modes.INSERT],
["<C-t>"], "Edit text field in Vi mode", ["<C-t>"], "Edit text field in Vi mode",
function () { modes.push(modes.TEXTAREA); }); function () {
if (!editor.isTextArea)
modes.push(modes.TEXTAREA);
else
dactyl.beep();
});
mappings.add([modes.INSERT], mappings.add([modes.INSERT],
["<Space>", "<Return>"], "Expand insert mode abbreviation", ["<Space>", "<Return>"], "Expand insert mode abbreviation",