diff --git a/common/content/commandline.js b/common/content/commandline.js index 4e6e186e..1c0647bb 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -365,7 +365,7 @@ const CommandLine = Module("commandline", { * @returns {boolean} */ get commandVisible() modes.main == modes.COMMAND_LINE && - !(modes.extended & (modes.INPUT_MULTILINE | modes.OUTPUT_MULTILINE)), + !(modes.extended & modes.INPUT_MULTILINE), /** * Ensure that the multiline input widget is the correct size. @@ -539,9 +539,9 @@ const CommandLine = Module("commandline", { this.widgets.message = null; if (modes.main != modes.COMMAND_LINE) this.widgets.command = null; - if ((modes.extended & modes.OUTPUT_MULTILINE) && this.widgets.multilineOutput.atEnd) + if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd) modes.pop(); - if (modes.extended != modes.OUTPUT_MULTILINE) + if (modes.main != modes.OUTPUT_MULTILINE) this.multilineOutputVisible = false; }, @@ -608,8 +608,8 @@ const CommandLine = Module("commandline", { this.hide(); this._startHints = false; - if (!(modes.extended & modes.OUTPUT_MULTILINE)) - modes.push(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE, { + if (modes.main != modes.OUTPUT_MULTILINE) + modes.push(modes.OUTPUT_MULTILINE, null, { onEvent: this.closure.onMultilineOutputEvent }); @@ -939,7 +939,7 @@ const CommandLine = Module("commandline", { /** * Handle events when we are in multi-line output mode, these come from - * dactyl when modes.extended & modes.MULTILINE_OUTPUT and also from + * dactyl when modes.extended & modes.OUTPUT_MULTILINE and also from * #dactyl-multiline-output in the XUL. * * @param {Event} event diff --git a/common/content/events.js b/common/content/events.js index bb99b277..6b6b5c75 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -657,6 +657,7 @@ const Events = Module("events", { switch (dactyl.mode) { case modes.COMMAND_LINE: case modes.INSERT: + case modes.OUTPUT_MULTILINE: case modes.PASS_THROUGH: case modes.QUOTE: case modes.TEXT_EDIT: diff --git a/common/content/modes.js b/common/content/modes.js index c59e85b6..bde52ba6 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -82,12 +82,12 @@ const Modes = Module("modes", { postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "") modes.pop() }, onEvent: function () { if (modes.main == modes.QUOTE) modes.pop() } }); + this.addMode("OUTPUT_MULTILINE"); // this._extended modes, can include multiple modes, and even main modes this.addMode("EX", true); this.addMode("HINTS", { count: false, ownsBuffer: true }); this.addMode("INPUT_MULTILINE", true); - this.addMode("OUTPUT_MULTILINE", true); this.addMode("SEARCH_FORWARD", true); this.addMode("SEARCH_BACKWARD", true); this.addMode("MENU", true); // a popupmenu is active