rem: if(historyIndex == -1) 
add: if (historyIndex == -1) 
context: function inputKeyDown(event){    if (event.keyCode == 13 && !event.altKey) {        if (mainWindow.isPaused() && mainWindow.currentStack) {            sendScript(inputElement.innerText);            inputElement.innerText = "";            inputElement.focus();        } else            alert("The debugger needs to be paused.\tIn order to evaluate your script input you need to pause the debugger in the context of another script.");        event.preventDefault();    } else if (event.keyCode == 38 && !event.altKey) {        var history = document.getElementById("history");        if(historyIndex == -1)            storedInput = inputElement.innerText;        var historyArray = history.childNodes;        var historySize = historyArray.length - 1;        if(historyIndex < historySize) {            historyIndex++;            inputElement.innerText = historyArray[historySize - historyIndex].childNodes[0].innerText;        }        event.preventDefault();    } else if (event.keyCode == 40 && !event.altKey) {        if(historyIndex >= 0) {            var history = document.getElementById("history");            historyIndex--;            if (historyIndex == -1)                inputElement.innerText = storedInput;            else {                var historyArray = history.childNodes;                inputElement.innerText = historyArray[(historyArray.length - 1) - historyIndex].childNodes[0].innerText;            }        }        event.preventDefault();    }}
meta: 1725	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1725/389df320bb262028c0bfcb707fcb9e5277284658/console.js/clean/WebKitTools/Drosera/console.js