Fix lua imports, fix linux backspace behaviour in console

This commit is contained in:
Lion Kortlepel
2020-11-06 15:50:03 +01:00
parent e5a0d43024
commit 6bebc4c160
2 changed files with 7 additions and 2 deletions

View File

@@ -116,14 +116,17 @@ void SetupConsole() {
HandleInput(CInputBuff);
CInputBuff.clear();
}
} else if (In == 8) {
} else if (In == 8 || In == 127) {
if (!CInputBuff.empty())
CInputBuff.pop_back();
} else if (In == 4) {
CInputBuff = "exit";
HandleInput(CInputBuff);
CInputBuff.clear();
} else if (!isprint(In)) {
// ignore
} else {
// info(std::to_string(In));
CInputBuff += char(In);
}
}