1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 23:08:00 +01:00

fully objectized History() and Bookmarks()

This commit is contained in:
Martin Stubenschrott
2007-05-18 15:36:17 +00:00
parent ac7c396023
commit 31a43298f6
5 changed files with 263 additions and 241 deletions

View File

@@ -66,7 +66,7 @@ function CommandLine ()
// for the example command "open sometext| othertext" (| is the cursor pos)
var completion_start_index = 0; // will be 5 because we want to complete arguments for the :open command
var completion_prefix = "" // will be: "open sometext"
var completion_postfix = ""; // will be: " othertext"
var completion_postfix = ""; // will be: " othertext"
var wild_index = 0; // keep track how often we press <Tab> in a row
var completion_index = UNINITIALIZED;
@@ -158,6 +158,10 @@ function CommandLine ()
this.echo = function(str)
{
var focused = document.commandDispatcher.focusedElement;
if (focused && focused == command_widget.inputField)
return;
setNormalStyle();
setPrompt("");
setCommand(str);
@@ -165,6 +169,10 @@ function CommandLine ()
this.echoErr = function(str)
{
var focused = document.commandDispatcher.focusedElement;
if (focused && focused == command_widget.inputField)
return;
setErrorStyle();
setPrompt("");
setCommand(str);