public void CleanUpReadln() { if (_inputReaderThread != null) { lock (ConsoleLock) { //Out.ConsoleCursorPosRestore(); // both works Out.CursorPos = _beginOfLineCurPos; if (CommandLineProcessor.CommandEvaluationContext.ShellEnv.IsOptionSetted(ShellEnvironmentVar.settings_console_enableCompatibilityMode)) { /* 💥 */ // ED p0 clean up screen in ConPty Out.Write(ANSI.EL(ANSI.ELParameter.p0)); // minimum compatible } else { Out.Write(ANSI.ED(ANSI.EDParameter.p0)); // not in compatibility mode ( TODO: check) } _inputReaderStringBuilder.Clear(); } } }