From 3271a6d510a0fc974c09748bc72dc117a7c917d4 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Tue, 30 Aug 2016 21:35:58 +0200 Subject: [PATCH] Actually fix the console scrolling issue. We just let pdcurses do it for us, PROPERLY! --- src/Components/Modules/Console.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index ee5073ea..dc3f19d6 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -279,11 +279,12 @@ namespace Components raw(); noecho(); - Console::OutputWindow = newpad(OUTPUT_HEIGHT, Console::Width); + Console::OutputWindow = newpad(Console::Height - 1, Console::Width); Console::InputWindow = newwin(1, Console::Width, Console::Height - 1, 0); Console::InfoWindow = newwin(1, Console::Width, 0, 0); scrollok(Console::OutputWindow, true); + idlok(Console::OutputWindow, true); scrollok(Console::InputWindow, true); nodelay(Console::InputWindow, true); keypad(Console::InputWindow, true); @@ -308,9 +309,6 @@ namespace Components wrefresh(Console::InfoWindow); wrefresh(Console::InputWindow); - // 4 Lines do not autoscroll/are multiline -> skip 4 lines when initializing - Console::ScrollOutput(4); - Console::RefreshOutput(); } @@ -346,11 +344,6 @@ namespace Components const char* p = message; while (*p != '\0') { - if (*p == '\n') - { - Console::ScrollOutput(1); - } - if (*p == '^') { char color;