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

Remove relict SEARCH_* modes. Hide unmappable QUOTE/PASS THROUGH/LINE modes.

This commit is contained in:
Kris Maglione
2010-12-30 17:13:33 -05:00
parent 12cd63ff16
commit f3903dc3d2
2 changed files with 5 additions and 5 deletions

View File

@@ -514,7 +514,8 @@ var Mappings = Module("mappings", {
type: CommandOption.STRING, type: CommandOption.STRING,
validator: function (value) Array.concat(value).every(findMode), validator: function (value) Array.concat(value).every(findMode),
completer: function () [[array.compact([mode.name.toLowerCase().replace(/_/g, "-"), mode.char]), mode.disp] 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) { function findMode(name) {

View File

@@ -69,9 +69,10 @@ var Modes = Module("modes", {
}); });
this.addMode("TEXT_EDIT", { char: "t", ownsFocus: true }); this.addMode("TEXT_EDIT", { char: "t", ownsFocus: true });
this.addMode("EMBED", { input: true, ownsFocus: true }); this.addMode("EMBED", { input: true, ownsFocus: true });
this.addMode("PASS_THROUGH"); this.addMode("PASS_THROUGH", { hidden: true });
this.addMode("QUOTE", { this.addMode("QUOTE", {
hidden: true,
display: function () modes.getStack(1).main == modes.PASS_THROUGH display: function () modes.getStack(1).main == modes.PASS_THROUGH
? (modes.getStack(2).mainMode.display() || modes.getStack(2).mainMode.name) + " (next)" ? (modes.getStack(2).mainMode.display() || modes.getStack(2).mainMode.name) + " (next)"
: "PASS THROUGH (next)" : "PASS THROUGH (next)"
@@ -87,10 +88,8 @@ var Modes = Module("modes", {
this.addMode("EX", true); this.addMode("EX", true);
this.addMode("HINTS", { count: false, ownsBuffer: true }); this.addMode("HINTS", { count: false, ownsBuffer: true });
this.addMode("INPUT_MULTILINE", 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("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.addMode("PROMPT", true);
this.push(this.NORMAL, 0, { this.push(this.NORMAL, 0, {