diff --git a/jquery.console.js b/jquery.console.js index e94aa4f..2f6113a 100644 --- a/jquery.console.js +++ b/jquery.console.js @@ -428,14 +428,14 @@ }; function clearCurrentPrompt() { - extern.promptText(""); + extern.promptText(""); }; function clearScreen() { - inner.children(".jquery-console-prompt-box, .jquery-console-message").remove(); - extern.report(" "); - extern.promptText(""); - extern.focus(); + inner.children(".jquery-console-prompt-box, .jquery-console-message").remove(); + extern.report(" "); + extern.promptText(""); + extern.focus(); }; function deleteNextWord() { @@ -684,11 +684,11 @@ }; function doComplete() { - if(typeof config.completeHandle == 'function') { - doCompleteDirectly(); - } else { - issueComplete(); - } + if(typeof config.completeHandle == 'function') { + doCompleteDirectly(); + } else { + issueComplete(); + } }; function doCompleteDirectly() { @@ -725,43 +725,43 @@ } }; - function issueComplete() { - if (typeof config.completeIssuer == 'function') { - config.completeIssuer(promptText); - } - }; - - function showCompletion(promptText, completions) { - - var len = completions.length; - if (len === 1) { - extern.promptText(promptText + completions[0]); - } else if (len > 1 && config.cols) { - var prompt = promptText; - // Compute the number of rows that will fit in the width - var max = 0; - for (var i = 0; i < len; i++) { - max = Math.max(max, completions[i].length); - } - max += 2; - var n = Math.floor(config.cols / max); - var buffer = ""; - var col = 0; - for (i = 0; i < len; i++) { - var completion = completions[i]; - buffer += completions[i]; - for (var j = completion.length; j < max; j++) { - buffer += " "; - } - if (++col >= n) { - buffer += "\n"; - col = 0; - } - } - commandResult(buffer, "jquery-console-message-value"); - extern.promptText(prompt); - } - }; + function issueComplete() { + if (typeof config.completeIssuer == 'function') { + config.completeIssuer(promptText); + } + }; + + function showCompletion(promptText, completions) { + + var len = completions.length; + if (len === 1) { + extern.promptText(promptText + completions[0]); + } else if (len > 1 && config.cols) { + var prompt = promptText; + // Compute the number of rows that will fit in the width + var max = 0; + for (var i = 0; i < len; i++) { + max = Math.max(max, completions[i].length); + } + max += 2; + var n = Math.floor(config.cols / max); + var buffer = ""; + var col = 0; + for (i = 0; i < len; i++) { + var completion = completions[i]; + buffer += completions[i]; + for (var j = completion.length; j < max; j++) { + buffer += " "; + } + if (++col >= n) { + buffer += "\n"; + col = 0; + } + } + commandResult(buffer, "jquery-console-message-value"); + extern.promptText(prompt); + } + }; function doNothing() {};