Skip to content

fix wrong terminal size on windows - #22

Closed
marler8997 wants to merge 1 commit into
const-void:masterfrom
marler8997:fixWindows
Closed

marler8997 wants to merge 1 commit into
const-void:masterfrom
marler8997:fixWindows

Conversation

@marler8997

Copy link
Copy Markdown
Contributor

Looks like this commit broke getting the terminal size on windows:

342c47e

They modified the size of the wAttributes field on CONSOLE_SCREEN_BUFFER_INFO. This appears to have been a mistake as it looks like they probably just did a search/replace of all the u16 types with u32, however, we can't change the size of this field as it's defined by the OS and in doing so our srWindow offset is now incorrect.

Looks like this commit broke getting the terminal size on windows:

342c47e

They modified the size of the `wAttributes` field on `CONSOLE_SCREEN_BUFFER_INFO`.
This appears to have been a mistake as it looks like they probably just
did a search/replace of all the `u16` types with `u32`, however, we
can't change the size of this field as it's defined by the OS and
in doing so our `srWindow` offset is now incorrect.
@sylr

sylr commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

Oops

@const-void

Copy link
Copy Markdown
Owner

hey all thank you, looping in to a larger patch. @sylr you did great, we as developers should be able to find/replace text without mangling core capabilities. I am updating so we can find/replace with confidence! It is on me, as I never bothered to give the win32 use case much thought. Continuous learning!

@const-void

Copy link
Copy Markdown
Owner

Closing this MR, thank you for submitting! The changes here have been folded into error-handling branch and merged with main. I have folded in the base std.os.windows types into the win32 object, so now we can find and replace without worry! Thank you all for the time and submission. Windows is still kinda wonky...it works in VS code, however CMD/Powershell are not there yet.

@const-void const-void closed this Feb 1, 2025
@marler8997
marler8997 deleted the fixWindows branch February 1, 2025 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants