mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-05 17:15:49 +01:00
Hopefully fix quirks in last commit
This commit is contained in:
@@ -72,7 +72,7 @@ const modes = (function () //{{{
|
|||||||
// Usually you should only indicate to leave a special mode like HINTS
|
// Usually you should only indicate to leave a special mode like HINTS
|
||||||
// by calling modes.reset() and adding the stuff which is needed
|
// by calling modes.reset() and adding the stuff which is needed
|
||||||
// for its cleanup here
|
// for its cleanup here
|
||||||
function handleModeChange(oldMode, newMode)
|
function handleModeChange(oldMode, newMode, oldExtended)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (oldMode)
|
switch (oldMode)
|
||||||
@@ -102,7 +102,7 @@ const modes = (function () //{{{
|
|||||||
|
|
||||||
case modes.COMMAND_LINE:
|
case modes.COMMAND_LINE:
|
||||||
// clean up for HINT mode
|
// clean up for HINT mode
|
||||||
if (modes.extended & modes.HINTS)
|
if (oldExtended & modes.HINTS)
|
||||||
hints.hide();
|
hints.hide();
|
||||||
commandline.close();
|
commandline.close();
|
||||||
break;
|
break;
|
||||||
@@ -173,18 +173,19 @@ const modes = (function () //{{{
|
|||||||
set: function (mainMode, extendedMode, silent)
|
set: function (mainMode, extendedMode, silent)
|
||||||
{
|
{
|
||||||
silent = (silent || main == mainMode && extended == extendedMode);
|
silent = (silent || main == mainMode && extended == extendedMode);
|
||||||
|
if (typeof extendedMode === "number")
|
||||||
|
extended = extendedMode;
|
||||||
// if a main mode is set, the extended is always cleared
|
// if a main mode is set, the extended is always cleared
|
||||||
if (typeof mainMode === "number")
|
if (typeof mainMode === "number")
|
||||||
{
|
{
|
||||||
if (mainMode != main)
|
let oldMain = main, oldExtended = extended;
|
||||||
handleModeChange(main, mainMode);
|
|
||||||
|
|
||||||
main = mainMode;
|
main = mainMode;
|
||||||
if (!extendedMode)
|
if (!extendedMode)
|
||||||
extended = modes.NONE;
|
extended = modes.NONE;
|
||||||
|
|
||||||
|
if (main != oldMain)
|
||||||
|
handleModeChange(oldMain, mainMode, oldExtended);
|
||||||
}
|
}
|
||||||
if (typeof extendedMode === "number")
|
|
||||||
extended = extendedMode;
|
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
this.show();
|
this.show();
|
||||||
|
|||||||
@@ -947,10 +947,8 @@ function CommandLine() //{{{
|
|||||||
}
|
}
|
||||||
if (!outputContainer.collapsed)
|
if (!outputContainer.collapsed)
|
||||||
{
|
{
|
||||||
setTimeout(function () {
|
modes.set(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE);
|
||||||
modes.set(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE);
|
commandline.updateMorePrompt();
|
||||||
commandline.updateMorePrompt();
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
keepCommand = false;
|
keepCommand = false;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user