From 83c9364bf1f2a6cfb14e6cb1d6e3fc6bb1d17fce Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Mon, 11 May 2020 23:11:33 +0200 Subject: [PATCH] lib: update TODO comments This removes one TODO comment and adds another that indicates that readline is currently not able to trigger specific escape sequences. Signed-off-by: Ruben Bridgewater PR-URL: https://github.com/nodejs/node/pull/33361 Reviewed-By: Anto Aravinth --- lib/readline.js | 6 +++++- test/parallel/test-assert-deep.js | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/readline.js b/lib/readline.js index e86fb50b22c..d3e881b2bdb 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -848,6 +848,8 @@ Interface.prototype._ttyWrite = function(s, key) { if (key.ctrl && key.shift) { /* Control and shift pressed */ switch (key.name) { + // TODO(BridgeAR): The transmitted escape sequence is `\b` and that is + // identical to -h. It should have a unique escape sequence. case 'backspace': this._deleteLineLeft(); break; @@ -945,8 +947,10 @@ Interface.prototype._ttyWrite = function(s, key) { } break; - // TODO(BridgeAR): This seems broken? case 'w': // Delete backwards to a word boundary + // TODO(BridgeAR): The transmitted escape sequence is `\b` and that is + // identical to -h. It should have a unique escape sequence. + // Falls through case 'backspace': this._deleteWordLeft(); break; diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js index 914f9ecd1a3..cc3132d55ec 100644 --- a/test/parallel/test-assert-deep.js +++ b/test/parallel/test-assert-deep.js @@ -958,8 +958,6 @@ assertDeepAndStrictEqual(obj1, obj2); // Check proxies. { - // TODO(BridgeAR): Check if it would not be better to detect proxies instead - // of just using the proxy value. const arrProxy = new Proxy([1, 2], {}); assert.deepStrictEqual(arrProxy, [1, 2]); const tmp = util.inspect.defaultOptions;