diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-28 19:11:04 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-28 20:04:40 +0530 |
commit | 59f943cd5097e9bdbc3cb3e6b5675e43d369341a (patch) | |
tree | 4fe2b81ef6a16c21827f2939da2c687aac0dde78 /yt_dlp/YoutubeDL.py | |
parent | 0a5a191a2a33e3b305aaf684576b7129ba5173a0 (diff) |
[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
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index eadc5d7ec..4351699b6 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -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 |