mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 21:02:25 +01:00
Unbreak commandline.input().
This commit is contained in:
@@ -896,7 +896,7 @@ const liberator = (function () //{{{
|
|||||||
if (urls.length > 20 && !force)
|
if (urls.length > 20 && !force)
|
||||||
{
|
{
|
||||||
liberator.commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no])",
|
liberator.commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no])",
|
||||||
function (resp) { if (resp.match(/^y(es)?$/i)) liberator.open(urls, where, true) });
|
function (resp) { if (resp && resp.match(/^y(es)?$/i)) liberator.open(urls, where, true) });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,8 @@ liberator.CommandLine = function () //{{{
|
|||||||
promptCallback = null;
|
promptCallback = null;
|
||||||
currentExtendedMode = null;
|
currentExtendedMode = null;
|
||||||
liberator.commandline.clear();
|
liberator.commandline.clear();
|
||||||
callback(value);
|
if (callback)
|
||||||
|
callback(value);
|
||||||
}
|
}
|
||||||
liberator.registerCallback("cancel", liberator.modes.PROMPT, closePrompt);
|
liberator.registerCallback("cancel", liberator.modes.PROMPT, closePrompt);
|
||||||
liberator.registerCallback("submit", liberator.modes.PROMPT, closePrompt);
|
liberator.registerCallback("submit", liberator.modes.PROMPT, closePrompt);
|
||||||
@@ -610,6 +611,7 @@ liberator.CommandLine = function () //{{{
|
|||||||
if (liberator.events.isAcceptKey(key))
|
if (liberator.events.isAcceptKey(key))
|
||||||
{
|
{
|
||||||
var mode = currentExtendedMode; // save it here, as setMode() resets it
|
var mode = currentExtendedMode; // save it here, as setMode() resets it
|
||||||
|
currentExtendedMode = null;
|
||||||
history.add(command);
|
history.add(command);
|
||||||
liberator.modes.pop();
|
liberator.modes.pop();
|
||||||
completionlist.hide();
|
completionlist.hide();
|
||||||
|
|||||||
Reference in New Issue
Block a user