summaryrefslogtreecommitdiff
path: root/src/console/ConsoleView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/ConsoleView.cpp')
-rw-r--r--src/console/ConsoleView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp
index 32b366c..67c83de 100644
--- a/src/console/ConsoleView.cpp
+++ b/src/console/ConsoleView.cpp
@@ -17,7 +17,7 @@ ConsoleView::ConsoleView():
ConsoleView * v;
public:
CommandHighlighter(ConsoleView * v_) { v = v_; }
- void TextChangedCallback(ui::Textbox * sender)
+ virtual void TextChangedCallback(ui::Textbox * sender)
{
sender->SetDisplayText(v->c->FormatCommand(sender->GetText()));
}
@@ -43,6 +43,7 @@ void ConsoleView::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, b
case KEY_ENTER:
c->EvaluateCommand(commandField->GetText());
commandField->SetText("");
+ commandField->SetDisplayText("");
break;
case KEY_DOWN:
c->NextCommand();
@@ -88,6 +89,7 @@ void ConsoleView::NotifyPreviousCommandsChanged(ConsoleModel * sender)
void ConsoleView::NotifyCurrentCommandChanged(ConsoleModel * sender)
{
commandField->SetText(sender->GetCurrentCommand().Command);
+ commandField->SetDisplayText(c->FormatCommand(commandField->GetText()));
}