diff --git a/Source/Console/ConsoleTTY/ConsoleTTY.cpp b/Source/Console/ConsoleTTY/ConsoleTTY.cpp index 1ab31a1d..e5e9e71e 100644 --- a/Source/Console/ConsoleTTY/ConsoleTTY.cpp +++ b/Source/Console/ConsoleTTY/ConsoleTTY.cpp @@ -711,60 +711,66 @@ namespace Aurora::Console::ConsoleTTY void TTYConsole::NoncanonicalOnEnter() { - AU_LOCK_GUARD(this->historyLock->AsWritable()); - - if (this->inputField.inputField.size()) - { + AuString line; - #if defined(AURORA_IS_MODERNNT_DERIVED) - if (this->inputField.inputField == "!s") - { - EnterScrollMode(); - } - else if (this->inputField.inputField == "!c") - { - LeaveScrollMode(); - } - else - #endif - if (this->inputField.inputField == "!b") - { - this->iScrollPos = -1; - this->bTriggerRedraw = true; - } - else if (this->inputField.inputField == "!t") - { - this->iScrollPos = 0; - this->bTriggerRedraw = true; - } - else + { + AU_LOCK_GUARD(this->historyLock->AsWritable()); + + if (this->inputField.inputField.size()) { + #if defined(AURORA_IS_MODERNNT_DERIVED) - if (this->inputField.inputField == "help") + if (this->inputField.inputField == "!s") { - AuLogInfo("ConsoleTTY: Type !s to enter scroll mode, type !c to enter host-os controlled copy/paste mode (quick-edit)"); + EnterScrollMode(); } - #endif - #if defined(AURORA_IS_POSIX_DERIVED) - if (this->inputField.inputField == "help") + else if (this->inputField.inputField == "!c") { - AuLogInfo("ConsoleTTY: Hold control + arrow key up/down to scroll."); + LeaveScrollMode(); } + else #endif - if (this->inputField.inputField == "help") + if (this->inputField.inputField == "!b") { - AuLogInfo("ConsoleTTY: use the command !t to scroll to the top, the command !b to lock-scroll to the bottom."); + this->iScrollPos = -1; + this->bTriggerRedraw = true; + } + else if (this->inputField.inputField == "!t") + { + this->iScrollPos = 0; + this->bTriggerRedraw = true; + } + else + { + #if defined(AURORA_IS_MODERNNT_DERIVED) + if (this->inputField.inputField == "help") + { + AuLogInfo("ConsoleTTY: Type !s to enter scroll mode, type !c to enter host-os controlled copy/paste mode (quick-edit)"); + } + #endif + #if defined(AURORA_IS_POSIX_DERIVED) + if (this->inputField.inputField == "help") + { + AuLogInfo("ConsoleTTY: Hold control + arrow key up/down to scroll."); + } + #endif + if (this->inputField.inputField == "help") + { + AuLogInfo("ConsoleTTY: use the command !t to scroll to the top, the command !b to lock-scroll to the bottom."); + } + + line = this->inputField.inputField; } - AuConsole::DispatchRawLine(this->inputField.inputField); + AuTryInsert(this->history, this->inputField.inputField); } - - AuTryInsert(this->history, this->inputField.inputField); + + this->inputField.Clear(); + + OnEnter(); } - this->inputField.Clear(); - - OnEnter(); + AuConsole::DispatchRawLine(line); } void TTYConsole::NoncanonicalOnMenuLeft() diff --git a/Source/Debug/ExceptionWatcher.NT.cpp b/Source/Debug/ExceptionWatcher.NT.cpp index e2bfe0fb..5e80bd41 100644 --- a/Source/Debug/ExceptionWatcher.NT.cpp +++ b/Source/Debug/ExceptionWatcher.NT.cpp @@ -222,8 +222,9 @@ namespace Aurora::Debug StackTrace ret; EXCEPTION_RECORD ex {}; - if (!bNoExit) + if (fatal && !bNoExit) { + // TODO: why? remove? if (!AuExchange(forceFail, true)) { Exit::PostLevel(AuThreads::GetThread(), Exit::ETriggerLevel::eFatalException);