diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-01-04 17:43:13 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2021-05-01 13:12:50 +0300 |
commit | 70cbe4a56578ae3a0b793598666a253a04e0ffd4 (patch) | |
tree | 9e92cb4680971fe147ae1e99359b4a3af0e9c139 /lib | |
parent | 1521a590024cfd20d6ee1bf328d55fb59c1ed1ed (diff) |
readline: fix behaviour of Interface plugged to a non-terminal output
Fixes: https://github.com/nodejs/node/issues/36773
PR-URL: https://github.com/nodejs/node/pull/36774
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/readline.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/readline.js b/lib/readline.js index ffd2aab5517..6fe456ec313 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -252,9 +252,6 @@ function Interface(input, output, completer, terminal) { input.on('keypress', onkeypress); input.on('end', ontermend); - // Current line - this.line = ''; - this._setRawMode(true); this.terminal = true; @@ -270,6 +267,9 @@ function Interface(input, output, completer, terminal) { self.once('close', onSelfCloseWithTerminal); } + // Current line + this.line = ''; + input.resume(); } |