Skip to content

Commit

Permalink
doc: note 'resize' event unreliability on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean-Coakley committed Jun 9, 2017
1 parent 9991e27 commit 6da59fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/tty.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,15 @@ or `writeStream.rows` properties have changed. No arguments are passed to the
listener callback when called.

```js
process.stdin.setRawMode(true);
process.stdout.on('resize', () => {
console.log('screen size has changed!');
console.log(`${process.stdout.columns}x${process.stdout.rows}`);
});
```

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

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

0 comments on commit 6da59fe

Please sign in to comment.