[*] Fix clipboard method to work with older noncan apps. still doesnt work under windows terminal

This commit is contained in:
Reece Wilson 2022-09-09 21:47:53 +01:00
parent 7bfa7911cf
commit 01871aee61
2 changed files with 10 additions and 1 deletions

View File

@ -164,8 +164,11 @@ namespace Aurora::Console::ConsoleStd
if (newHash != gLastHash)
{
if (gLastHash)
{
ConsoleTTY::EnterScrollMode();
}
gLastHash = newHash;
ConsoleTTY::EnterScrollMode();
}
::CloseClipboard();

View File

@ -863,6 +863,12 @@ namespace Aurora::Console::ConsoleTTY
{
if (this->screenBuffer.size() > maxLines)
{
static bool bSingleShot {};
if (!AuExchange(bSingleShot, true))
{
EnterScrollMode();
}
// TODO (Reece): Removing optimization bc it was broken. This is a nightmare.
auto indexBeforePadding = (this->GetBannerFootBorder() ? 1 + this->topLogPadding : 0) + this->topLogPaddingExtra;
auto startIndex = this->GetTopBorder() + this->GetBannerLines() + indexBeforePadding;