Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update readline key-bindings and TODO comments #33361

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
@@ -750,7 +750,7 @@ const { createInterface } = require('readline');
<tr>
<td><code>ctrl</code> + <code>shift</code> + <code>delete</code></td>
<td>Delete line right</td>
<td>Doesn't work on Linux and Mac</td>
<td>Doesn't work on Mac</td>
</tr>
<tr>
<td><code>ctrl</code> + <code>c</code></td>
@@ -824,7 +824,7 @@ const { createInterface } = require('readline');
+ <code>backspace</code></td>
<td>Delete backwards to a word boundary</td>
<td><code>ctrl</code> + <code>backspace</code> Doesn't
work as expected on Windows</td>
work on Linux, Mac and Windows</td>
</tr>
<tr>
<td><code>ctrl</code> + <code>delete</code></td>
6 changes: 5 additions & 1 deletion lib/readline.js
Original file line number Diff line number Diff line change
@@ -855,6 +855,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 <ctrl>-h. It should have a unique escape sequence.
case 'backspace':
this._deleteLineLeft();
break;
@@ -952,8 +954,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 <ctrl>-h. It should have a unique escape sequence.
// Falls through
case 'backspace':
this._deleteWordLeft();
break;
2 changes: 0 additions & 2 deletions test/parallel/test-assert-deep.js
Original file line number Diff line number Diff line change
@@ -957,8 +957,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;