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

When warning about the terminal window size, it should print the minimum required #13

Open
chungy opened this issue Mar 9, 2019 · 4 comments

Comments

@chungy
Copy link

chungy commented Mar 9, 2019

Currently, when it prints a message such as:

This puzzle is 21 columns wide and 21 rows tall. The terminal window must be wider and taller to properly display it.

It doesn't give an indication of just how big the window has to be, I've had to try several times before hitting a sweet spot. Since a lot of window managers and terminal emulators will display the grid size while resizing, giving a minimum required size will save a lot of time in this scenario.

@mnp
Copy link

mnp commented Mar 9, 2019

I'm also getting this message for some terminal sizes. If sizing larger, then I get the Unicode error in #12. I don't seem to have a sweet spot.

@thisisparker
Copy link
Owner

@chungy this is a good suggestion, and it should probably be implemented along with #5. Ideally it says the axis (or axes) on which your window needs to be larger (and, like you suggest, by how much), and allows you to resize without quitting, automatically drawing the puzzle when the window gets big enough. It would be pretty trivial to do that on open, but I'd like to make the same code work for during mid-run resizes, too, which might take a little longer.

@mnp I see you've resolved #12 now but yeah... the drawing happens after the size check, so if you're getting stopped at the size check it won't run into the ASCII issues.

@culcube
Copy link

culcube commented Jun 16, 2021

It doesn't give an indication of just how big the window has to be,

I agree. It would be useful if the necessary_resize function also passed the number of extra rows and/or columns. As a new user it isn't obvious that, e.g. a 15x15 grid needs 43 rows.

@thisisparker
Copy link
Owner

Yeah, this is a good stopgap, although I'd guess most people don't have super ready access to the number of rows or columns in their current terminal window. In the medium term the best solution is to allow resizing of the window until it fits, and in the long term I'd like to make some kind of scrolling functionality.

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

No branches or pull requests

4 participants