You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deno.consoleSize() is incorrectly returning the console buffer size instead of the console window size. This can be seen when using the usual console window (not 'Windows Terminal').
I hadn't noticed this issue earlier because I primarily use 'Windows Terminal' which maintains its own scrollback buffer and allocates a console screen buffer which is the same size as the console view window. Additionally, most allocated consoles only reserve extra lines for the screen buffer, not extra columns. And most uses only care about the column width of the screen. As a result, Deno.consoleSize() has been accidentally correct for the majority of users and cases, likely since inception (#6520).
for all versions of
deno
since at least 1.21.0Deno.consoleSize()
is incorrectly returning the console buffer size instead of the console window size. This can be seen when using the usual console window (not 'Windows Terminal').I hadn't noticed this issue earlier because I primarily use 'Windows Terminal' which maintains its own scrollback buffer and allocates a console screen buffer which is the same size as the console view window. Additionally, most allocated consoles only reserve extra lines for the screen buffer, not extra columns. And most uses only care about the column width of the screen. As a result,
Deno.consoleSize()
has been accidentally correct for the majority of users and cases, likely since inception (#6520).The error is in runtime/ops/tty/rs:
deno/runtime/ops/tty.rs
Lines 273 to 276 in d64921c
It's an easy fix. I'll post a PR for the fix in a few minutes.
The text was updated successfully, but these errors were encountered: