From ff07eaa140e54745a5298f4c929936cfe055ed3c Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Fri, 9 Jun 2017 09:40:53 -0400 Subject: [PATCH] doc: note 'resize' event conditions on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/13576 Fixes: https://github.com/nodejs/node/issues/13197 Reviewed-By: Tobias Nießen Reviewed-By: James M Snell Reviewed-By: Bartosz Sosnowski Reviewed-By: Gibson Fahnestock Reviewed-By: Refael Ackermann --- doc/api/tty.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/tty.md b/doc/api/tty.md index 8f250e45d65..963de892cbc 100644 --- a/doc/api/tty.md +++ b/doc/api/tty.md @@ -88,6 +88,15 @@ process.stdout.on('resize', () => { }); ``` +*Note*: On Windows resize events will be emitted only if stdin is unpaused +(by a call to `resume()` or by adding a data listener) and in raw mode. It can +also be triggered if a terminal control sequence that moves the cursor is +written to the screen. Also, the resize event will only be signaled if the +console screen buffer height was also changed. For example shrinking the +console window height will not cause the resize event to be emitted. Increasing +the console window height will only be registered when the new console window +height is greater than the current console buffer size. + ### writeStream.columns