1
0
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:
Kris Maglione
2008-12-16 11:30:28 -05:00
parent f1dd97212d
commit f1565ca5ce
2 changed files with 10 additions and 11 deletions

View File

@@ -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();

View File

@@ -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;
}, },