Skip to content

Commit

Permalink
fix a bug in line wraps
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybaloney committed May 21, 2024
1 parent e831a2b commit bd3a7fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/_pyrepl/windows_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class INPUT_RECORD(Structure):
}

ENABLE_PROCESSED_OUTPUT = 0x01
ENABLE_WRAP_AT_EOL_OUTPUT = 0x02
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x04

class _error(Exception):
Expand All @@ -197,7 +198,7 @@ def __init__(
encoding: str = "",
):

SetConsoleMode(OutHandle, ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
SetConsoleMode(OutHandle, ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
self.encoding = encoding or sys.getdefaultencoding()

if isinstance(f_in, int):
Expand Down

0 comments on commit bd3a7fc

Please sign in to comment.