SCP: Enable line wrapping at EOL on Windows console (Peter Schorn)
Simulators running directly in a Windows console session, that don't have the console traffic redirected to a telnet session via SET CONSOLE TELNET=nnn now behave similarly to the default behavior experienced on non-windows hosts where the terminal session usually defaults to wrapping at EOL. Users who want more specific control of this behavior can run their console via a telnet session with a terminal emulator that lets them explicitly set these features in the emulator. This change reintroduces this behavior which got lost when windows support for ANSI (VT100) escape sequences were added to the console sessions.
This commit is contained in:
parent
4443789fd0
commit
4757632f9e
1 changed files with 2 additions and 2 deletions
|
@ -3454,8 +3454,8 @@ if ((sim_ttisatty ()) &&
|
||||||
if ((std_output) && /* If Not Background process? */
|
if ((std_output) && /* If Not Background process? */
|
||||||
(std_output != INVALID_HANDLE_VALUE)) {
|
(std_output != INVALID_HANDLE_VALUE)) {
|
||||||
if (GetConsoleMode(std_output, &saved_output_mode))
|
if (GetConsoleMode(std_output, &saved_output_mode))
|
||||||
if (!SetConsoleMode(std_output, ENABLE_VIRTUAL_TERMINAL_PROCESSING|ENABLE_PROCESSED_OUTPUT))
|
if (!SetConsoleMode(std_output, ENABLE_VIRTUAL_TERMINAL_PROCESSING|ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT))
|
||||||
SetConsoleMode(std_output, ENABLE_PROCESSED_OUTPUT);
|
SetConsoleMode(std_output, ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT);
|
||||||
}
|
}
|
||||||
if (sim_log) {
|
if (sim_log) {
|
||||||
fflush (sim_log);
|
fflush (sim_log);
|
||||||
|
|
Loading…
Add table
Reference in a new issue