mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-11 03:09:35 +00:00
[utils] write_string
: Workaround newline issue in conhost
On windows `conhost`, when `WINDOWS_VT_MODE` is enabled, `\n` is not actually sent if the window is exactly the length of printed line, and the line does not end with a white-space character. So the line-break disappears when resizing the window. Fixes #1863
This commit is contained in:
@@ -3580,7 +3580,7 @@ class YoutubeDL:
|
||||
def get_encoding(stream):
|
||||
ret = str(getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__))
|
||||
if not supports_terminal_sequences(stream):
|
||||
from .compat import WINDOWS_VT_MODE
|
||||
from .compat import WINDOWS_VT_MODE # Must be imported locally
|
||||
ret += ' (No VT)' if WINDOWS_VT_MODE is False else ' (No ANSI)'
|
||||
return ret
|
||||
|
||||
|
Reference in New Issue
Block a user