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

stty size not updated on macOS #1327

Closed
jfmc opened this issue Jan 30, 2020 · 2 comments · Fixed by #1354
Closed

stty size not updated on macOS #1327

jfmc opened this issue Jan 30, 2020 · 2 comments · Fixed by #1354
Labels
Milestone

Comments

@jfmc
Copy link

jfmc commented Jan 30, 2020

When resizing a terminal window (both Terminal.app and iTerm2), the value returned by stty size is not updated w.r.t. the initial value when it is run from a multipass shell.

@ricab
Copy link
Collaborator

ricab commented Feb 3, 2020

HI @jfmc thanks for reporting this. I confirm the columns are not getting updated. When increasing them, this results in the same thing that is described in #1326. A different solution will be needed though.

For now, stty cols N should workaround the issue, where N corresponds to the window size shown at the terminal's title bar. Does that fix it for you?

@jfmc
Copy link
Author

jfmc commented Feb 4, 2020

Thanks @ricab!

Resizing a terminal with an open emacs inside is a bit cumbersome, but this works for me:

  • whenever the terminal size change press C-z to suspend emacs
  • set new size with stty cols N+stty rows M
  • bring emacs back to foreground with the fg command

@Saviq Saviq added this to the v1.1.0 milestone Feb 18, 2020
bors bot added a commit that referenced this issue Feb 21, 2020
1354: unix_console: Better handle SIGWINCH r=Saviq a=townsend2010

On OSX, SIGWINCH is ignored by default and thus, the way the console code was waiting on the signal,
it was never being delivered and the console size would never change.

Since OSX and Linux handle the console code the same, this change is for both platforms.

Fixes #1327



Co-authored-by: Chris Townsend <[email protected]>
@bors bors bot closed this as completed in b82c266 Feb 21, 2020
Saviq pushed a commit that referenced this issue Feb 21, 2020
1354: unix_console: Better handle SIGWINCH r=Saviq a=townsend2010

On OSX, SIGWINCH is ignored by default and thus, the way the console code was waiting on the signal,
it was never being delivered and the console size would never change.

Since OSX and Linux handle the console code the same, this change is for both platforms.

Fixes #1327



Co-authored-by: Chris Townsend <[email protected]>
luis4a0 pushed a commit that referenced this issue Mar 11, 2020
On OSX, SIGWINCH is ignored by default and thus, the way the console code was waiting on the signal,
it was never being delivered and the console size would never change.

Since OSX and Linux handle the console code the same, this change is for both platforms.

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

Successfully merging a pull request may close this issue.

3 participants