Skip to content

Commit 9599faa

Browse files
Dean-CoakleyMylesBorins
authored andcommitted
doc: note 'resize' event conditions on Windows
PR-URL: #13576 Fixes: #13197 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 8dbf827 commit 9599faa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/api/tty.md

+9
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ process.stdout.on('resize', () => {
8888
});
8989
```
9090

91+
*Note*: On Windows resize events will be emitted only if stdin is unpaused
92+
(by a call to `resume()` or by adding a data listener) and in raw mode. It can
93+
also be triggered if a terminal control sequence that moves the cursor is
94+
written to the screen. Also, the resize event will only be signaled if the
95+
console screen buffer height was also changed. For example shrinking the
96+
console window height will not cause the resize event to be emitted. Increasing
97+
the console window height will only be registered when the new console window
98+
height is greater than the current console buffer size.
99+
91100
### writeStream.columns
92101
<!-- YAML
93102
added: v0.7.7

0 commit comments

Comments
 (0)