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

doc: add note to tty.WriteStream event 'resize' on Windows #13576

Closed
wants to merge 9 commits into from
2 changes: 2 additions & 0 deletions doc/api/tty.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ process.stdout.on('resize', () => {
});
```

*Note:* Unrealiable event handler execution on all Windows platforms.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. UnrealiableUnreliable
  2. What exactly do you want to say? Please try to use whole sentences if possible. Do you mean that the execution of this event is unreliable on Windows?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something like:

*Note:*  Terminal window resize events are unreliable on Windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gibfahn As per your comment I would suggest to include a note about having to use setRawMode on Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems much better. Is it ok as 2 commits or do I need to squash/rebase?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit terse... can you expand this just a bit more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could add something like
Event handler only is only executed when the width is changed

It was also suggested here that raw mode must be enabled but I did not find this in my own testing.


### writeStream.columns
<!-- YAML
added: v0.7.7
Expand Down