Index: trunk/src/lib/shell/shell_input.cc
===================================================================
--- trunk/src/lib/shell/shell_input.cc	(revision 5243)
+++ trunk/src/lib/shell/shell_input.cc	(revision 5244)
@@ -108,4 +108,25 @@
 
 /**
+ * sets the entire text of the InputLine to text
+ * @param text the new Text to set as InputLine
+ */
+void ShellInput::setInputText(const char* text)
+{
+  delete[] this->inputLine;
+  if (text == NULL)
+  {
+    this->inputLine = new char[1];
+    this->inputLine[0] = '\0';
+  }
+  else
+  {
+    this->inputLine = new char[strlen(text)+1];
+    strcpy(this->inputLine, text);
+  }
+  this->setText(this->inputLine, true);
+}
+
+
+/**
  * adds one character to the inputLine
  * @param character the character to add to the inputLine
@@ -113,4 +134,11 @@
 void ShellInput::addCharacter(char character)
 {
+  if (this->historyScrolling)
+  {
+    delete[] this->history->lastElement();
+    this->history->remove(this->history->lastElement());
+    this->historyScrolling = false;
+  }
+
   char* addCharLine = new char[strlen(this->inputLine)+2];
 
@@ -127,4 +155,11 @@
 void ShellInput::addCharacters(const char* characters)
 {
+  if (this->historyScrolling)
+  {
+    delete[] this->history->lastElement();
+    this->history->remove(this->history->lastElement());
+    this->historyScrolling = false;
+  }
+
   char* addCharLine = new char[strlen(this->inputLine)+strlen(characters)+1];
 
@@ -141,4 +176,11 @@
 void ShellInput::removeCharacters(unsigned int characterCount)
 {
+  if (this->historyScrolling)
+  {
+    delete[] this->history->lastElement();
+    this->history->remove(this->history->lastElement());
+    this->historyScrolling = false;
+  }
+
   if (strlen(this->inputLine) == 0)
     return;
@@ -171,4 +213,5 @@
   {
     delete[] this->history->lastElement();
+    this->history->remove(this->history->lastElement());
     this->historyScrolling = false;
   }
@@ -197,7 +240,7 @@
   if (!this->historyScrolling)
   {
-    char* newCommand = new char[strlen(this->inputLine)+1];
-    strcpy(newCommand, this->inputLine);
-    this->history->add(newCommand);
+    char* currentText = new char[strlen(this->inputLine)+1];
+    strcpy(currentText, this->inputLine);
+    this->history->add(currentText);
     this->historyScrolling = true;
     this->historyIT->lastElement();
@@ -210,7 +253,6 @@
   {
     this->flush();
-    this->addCharacters(prevElem);
-  }
-
+    this->setInputText(prevElem);
+  }
 }
 
@@ -228,5 +270,5 @@
   {
     this->flush();
-    this->addCharacters(nextElem);
+    this->setInputText(nextElem);
   }
 }
@@ -301,22 +343,5 @@
     else if (event.type == SDLK_RETURN)
       this->executeCommand();
-    /*
-    else if (event.type == SDLK_UP)
-    {
-//      this->flushInputLine();
-    tIterator<char>* iterator = this->commandList->getIterator();
-    char* command = iterator->lastElement();
-    while (command)
-    {
-    if (!strcmp (command, inputLine))
-    {
-    inputLine = iterator->prevElement();
-    return;
-  }
-    command = iterator->prevElement();
-  }
-    inputLine = iterator->lastElement();
-  }
-    */
+    // any other keyboard key
     else if (likely(event.type < 127))
     {
Index: trunk/src/lib/shell/shell_input.h
===================================================================
--- trunk/src/lib/shell/shell_input.h	(revision 5243)
+++ trunk/src/lib/shell/shell_input.h	(revision 5244)
@@ -31,4 +31,5 @@
   // InputLine
   void flush();
+  void setInputText(const char* text);
   void addCharacter(char character);
   void addCharacters(const char* characters);
Index: trunk/src/lib/util/list.h
===================================================================
--- trunk/src/lib/util/list.h	(revision 5243)
+++ trunk/src/lib/util/list.h	(revision 5244)
@@ -520,7 +520,9 @@
 }
 
-
 /**
  *  use it to move through the list without interfering with the iteration
+ * @returns previous list element
+ *
+ * this stepping mode will !not! step beyond the boundraries of the List!
  */
 template<class T>
@@ -540,4 +542,6 @@
  *  use it to move backwards through the list without interfering with the itereation
  * @returns next list element
+ *
+ * this stepping mode will !not! step beyond the boundraries of the List!
  */
 template<class T>
@@ -553,4 +557,7 @@
 }
 
+/**
+ * @returns the current Element
+ */
 template<class T>
     inline T* tIterator<T>::getCurrent()
