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

Respond and reflow with terminal resize events #153

Closed
duncanbeevers opened this issue Mar 12, 2019 · 8 comments · Fixed by #304
Closed

Respond and reflow with terminal resize events #153

duncanbeevers opened this issue Mar 12, 2019 · 8 comments · Fixed by #304

Comments

@duncanbeevers
Copy link

Listening to stdout.on('resize') is pretty straight-forward, but it looks like the ink renderer is instantiated at a fixed terminalWidth.

Is it feasible to reconfigure the renderer or to create a new renderer in response to terminal size changes?

@vadimdemedes
Copy link
Owner

Yep, it's possible and Ink had it in pre-release versions, but I reverted it because of bugs. Will try it out again.

@vadimdemedes
Copy link
Owner

Fix is in master, going to keep this issue open until Ink 3 release is out.

@vadimdemedes
Copy link
Owner

Ink 3 is out with the fix for this issue included! Read the full announcement at https://vadimdemedes.com/posts/ink-3 :)

@duncanbeevers
Copy link
Author

Congrats @vadimdemedes !

@vadimdemedes
Copy link
Owner

Thanks @duncanbeevers!

@gajus
Copy link

gajus commented Jun 12, 2023

This does not appear to work reliably.

Is there a way to manually trigger repaint/recalculation of window size?

For instance, in iTerm, I am using shift+cmd+return to focus/blur pane, and that appears to not recalculate the viewport size.

Either that, or my expectations are wrong.

Screenshot 2023-06-12 at 5 14 30 PM Screenshot 2023-06-12 at 5 15 47 PM

@gajus
Copy link

gajus commented Jun 12, 2023

CC @vadimdemedes as this is a pretty old issue

@vadimdemedes
Copy link
Owner

@gajus Feel free to open a new issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants