1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 16:05:45 +01:00

moved hints to commandline.input(), thanks Xie&Tian

This commit is contained in:
Martin Stubenschrott
2008-10-29 00:09:22 +00:00
parent 8839f286fb
commit 8d9c6fcb28
8 changed files with 130 additions and 120 deletions

View File

@@ -148,7 +148,8 @@ function CommandLine() //{{{
var multilineCallback = null;
// callback for prompt mode
var promptCallback = null;
var promptSubmitCallback = null;
var promptChangeCallback = null;
var promptCompleter = null;
liberator.registerCallback("change", modes.EX, function (command) {
@@ -160,8 +161,8 @@ function CommandLine() //{{{
function closePrompt(value)
{
let callback = promptCallback;
promptCallback = null;
let callback = promptSubmitCallback;
promptSubmitCallback = null;
currentExtendedMode = null;
commandline.clear();
if (callback)
@@ -169,6 +170,8 @@ function CommandLine() //{{{
}
liberator.registerCallback("cancel", modes.PROMPT, closePrompt);
liberator.registerCallback("submit", modes.PROMPT, closePrompt);
liberator.registerCallback("change", modes.PROMPT,
function (str) { if (promptChangeCallback) return promptChangeCallback(str); });
liberator.registerCallback("complete", modes.PROMPT,
function (str) { if (promptCompleter) return promptCompleter(str); });
@@ -665,7 +668,8 @@ function CommandLine() //{{{
{
extra = extra || {};
promptCallback = callback;
promptSubmitCallback = callback;
promptChangeCallback = extra.onChange;
promptCompleter = extra.completer;
modes.push(modes.COMMAND_LINE, modes.PROMPT);
currentExtendedMode = modes.PROMPT;