From f3903dc3d25fa78de05a5923831d514daa30bc6d Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 30 Dec 2010 17:13:33 -0500 Subject: [PATCH] Remove relict SEARCH_* modes. Hide unmappable QUOTE/PASS THROUGH/LINE modes. --- common/content/mappings.js | 3 ++- common/content/modes.js | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/content/mappings.js b/common/content/mappings.js index a77f03ed..b26d7506 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -514,7 +514,8 @@ var Mappings = Module("mappings", { type: CommandOption.STRING, validator: function (value) Array.concat(value).every(findMode), completer: function () [[array.compact([mode.name.toLowerCase().replace(/_/g, "-"), mode.char]), mode.disp] - for (mode in values(modes.all))], + for (mode in values(modes.all)) + if (!mode.hidden)], }; function findMode(name) { diff --git a/common/content/modes.js b/common/content/modes.js index 7cfcf97d..65cf7eac 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -69,9 +69,10 @@ var Modes = Module("modes", { }); this.addMode("TEXT_EDIT", { char: "t", ownsFocus: true }); this.addMode("EMBED", { input: true, ownsFocus: true }); - this.addMode("PASS_THROUGH"); + this.addMode("PASS_THROUGH", { hidden: true }); this.addMode("QUOTE", { + hidden: true, display: function () modes.getStack(1).main == modes.PASS_THROUGH ? (modes.getStack(2).mainMode.display() || modes.getStack(2).mainMode.name) + " (next)" : "PASS THROUGH (next)" @@ -87,10 +88,8 @@ var Modes = Module("modes", { this.addMode("EX", true); this.addMode("HINTS", { count: false, ownsBuffer: true }); this.addMode("INPUT_MULTILINE", true); - this.addMode("SEARCH_FORWARD", true); - this.addMode("SEARCH_BACKWARD", true); this.addMode("MENU", true); // a popupmenu is active - this.addMode("LINE", true); // linewise visual mode + this.addMode("LINE", { extended: true, hidden: true }); // linewise visual mode this.addMode("PROMPT", true); this.push(this.NORMAL, 0, {