mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 07:17:59 +01:00
Multiline output mode isn't a sub-mode of command-line mode. Fixes MOW scrolling issues and makes MOW keys bindable.
This commit is contained in:
@@ -365,7 +365,7 @@ const CommandLine = Module("commandline", {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
get commandVisible() modes.main == modes.COMMAND_LINE &&
|
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.
|
* Ensure that the multiline input widget is the correct size.
|
||||||
@@ -539,9 +539,9 @@ const CommandLine = Module("commandline", {
|
|||||||
this.widgets.message = null;
|
this.widgets.message = null;
|
||||||
if (modes.main != modes.COMMAND_LINE)
|
if (modes.main != modes.COMMAND_LINE)
|
||||||
this.widgets.command = null;
|
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();
|
modes.pop();
|
||||||
if (modes.extended != modes.OUTPUT_MULTILINE)
|
if (modes.main != modes.OUTPUT_MULTILINE)
|
||||||
this.multilineOutputVisible = false;
|
this.multilineOutputVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -608,8 +608,8 @@ const CommandLine = Module("commandline", {
|
|||||||
this.hide();
|
this.hide();
|
||||||
|
|
||||||
this._startHints = false;
|
this._startHints = false;
|
||||||
if (!(modes.extended & modes.OUTPUT_MULTILINE))
|
if (modes.main != modes.OUTPUT_MULTILINE)
|
||||||
modes.push(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE, {
|
modes.push(modes.OUTPUT_MULTILINE, null, {
|
||||||
onEvent: this.closure.onMultilineOutputEvent
|
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
|
* 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.
|
* #dactyl-multiline-output in the XUL.
|
||||||
*
|
*
|
||||||
* @param {Event} event
|
* @param {Event} event
|
||||||
|
|||||||
@@ -657,6 +657,7 @@ const Events = Module("events", {
|
|||||||
switch (dactyl.mode) {
|
switch (dactyl.mode) {
|
||||||
case modes.COMMAND_LINE:
|
case modes.COMMAND_LINE:
|
||||||
case modes.INSERT:
|
case modes.INSERT:
|
||||||
|
case modes.OUTPUT_MULTILINE:
|
||||||
case modes.PASS_THROUGH:
|
case modes.PASS_THROUGH:
|
||||||
case modes.QUOTE:
|
case modes.QUOTE:
|
||||||
case modes.TEXT_EDIT:
|
case modes.TEXT_EDIT:
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ const Modes = Module("modes", {
|
|||||||
postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "<C-v>") modes.pop() },
|
postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "<C-v>") modes.pop() },
|
||||||
onEvent: function () { if (modes.main == modes.QUOTE) 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._extended modes, can include multiple modes, and even main 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("OUTPUT_MULTILINE", true);
|
|
||||||
this.addMode("SEARCH_FORWARD", true);
|
this.addMode("SEARCH_FORWARD", true);
|
||||||
this.addMode("SEARCH_BACKWARD", true);
|
this.addMode("SEARCH_BACKWARD", true);
|
||||||
this.addMode("MENU", true); // a popupmenu is active
|
this.addMode("MENU", true); // a popupmenu is active
|
||||||
|
|||||||
Reference in New Issue
Block a user