public function clearHistory()
    {
        $this->historyLines = array();
        $this->historyPosition = null;

        if ($this->historyUnsaved !== null) {
            $this->setInput($this->historyUnsaved);
            $this->historyUnsaved = null;
        }

        return $this;
    }