Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Correct result of Terminal::size #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

murarth
Copy link
Owner

@murarth murarth commented Jan 22, 2020

Fixes #14

@prabirshrestha
Copy link

Hmm... I'm getting the following error:

Error: Os { code: 87, kind: Other, message: "The parameter is incorrect." }                 
error: process didn't exit successfully: `target\debug\kilo.exe` (exit code: 1)   

@murarth
Copy link
Owner Author

murarth commented Jan 22, 2020

I did some digging and found that the error comes from the SetConsoleScreenBufferSize call here.

I'm not sure why that call is returning an error. The input parameters seem to be correct.

@prabirshrestha
Copy link

@murarth any updates on this?

crossterm seems to do +1 for windows. Wondering if this is the same bug here too. crossterm-rs/crossterm#176

@murarth
Copy link
Owner Author

murarth commented Apr 19, 2020

@prabirshrestha I'm not sure if that bug is related. I'm already adding 1 in the console size calculation here: https://github.com/murarth/mortal/pull/15/files#diff-fecc2cd4b8274c43f2394182f511ae08R1022

Also, adding 1 again when setting the console buffer size appears to have no effect.

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.

terminal size is not correctly reported on windows
2 participants