Fix printing, make CI into unique_ptr (more)

This commit is contained in:
Lion Kortlepel
2020-11-08 21:46:02 +01:00
parent b663563f01
commit 7fce274915
6 changed files with 8 additions and 5 deletions

View File

@@ -132,6 +132,7 @@ static bool CompositeInputExpected { false };
static void ProcessCompositeInput() {
if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 65 }.data(), 2) == 0) {
// UP ARROW
info(std::to_string(ConsoleHistoryReadIndex));
if (!ConsoleHistory.empty()) {
if (ConsoleHistoryReadIndex != 0) {
ConsoleHistoryReadIndex -= 1;
@@ -140,6 +141,7 @@ static void ProcessCompositeInput() {
}
} else if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 66 }.data(), 2) == 0) {
// DOWN ARROW
info(std::to_string(ConsoleHistoryReadIndex));
if (!ConsoleHistory.empty()) {
if (ConsoleHistoryReadIndex != ConsoleHistory.size() - 1) {
ConsoleHistoryReadIndex += 1;