Skip to content

Commit

Permalink
Console: Exit on Ctrl+D if the command is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Dec 28, 2016
1 parent c49563b commit 06a6325
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ bool ScriptConsole::keyPressed(Keyboard::Key key, KeyModifiers mod) {
if(mod.control) {
switch(key) {

case Keyboard::Key_D: {
if(text().empty()) {
close();
return true;
}
break;
}

case Keyboard::Key_F: {
if(cursorPos() == text().size()) {
autocomplete(1);
Expand Down

0 comments on commit 06a6325

Please sign in to comment.