From e6018137325e9901117b5e8b5a03fff643ebb2e3 Mon Sep 17 00:00:00 2001 From: Konstantin Upir Date: Sat, 25 Mar 2023 14:54:31 +0100 Subject: [PATCH] fix linewrap option for WriteStream --- lib/terminal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/terminal.js b/lib/terminal.js index 7445563..c12d492 100644 --- a/lib/terminal.js +++ b/lib/terminal.js @@ -134,12 +134,13 @@ class Terminal{ // control line wrapping lineWrapping(enabled){ + // store state + this.linewrap = enabled; + if (!this.stream.isTTY){ return; } - // store state - this.linewrap = enabled; if (enabled){ this.stream.write('\x1B[?7h'); }else{