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

REPL in editor mode crashes during tab completion #43528

Closed
cola119 opened this issue Jun 22, 2022 · 0 comments · Fixed by #43543
Closed

REPL in editor mode crashes during tab completion #43528

cola119 opened this issue Jun 22, 2022 · 0 comments · Fixed by #43543
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.

Comments

@cola119
Copy link
Member

cola119 commented Jun 22, 2022

Version

v18.4.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

$ node
Welcome to Node.js v18.4.0.
Type ".help" for more information.
> .editor
// Entering editor mode (Ctrl+D to finish, Ctrl+C to cancel)
a

And then press TAB

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

Works without problems.

What do you see instead?

> .editor
// Entering editor mode (Ctrl+D to finish, Ctrl+C to cancel)
anode:internal/readline/emitKeypressEvents:74
            throw err;
            ^

TypeError: Cannot read properties of undefined (reading 'length')
    at commonPrefix (node:internal/readline/utils:375:27)
    at [_tabCompleter] (node:internal/readline/interface:670:20)
    at node:readline:448:24
    at node:repl:1606:3
    at completionGroupsLoaded (node:repl:1592:5)
    at REPLServer.complete (node:repl:1489:7)
    at REPLServer.completer (node:repl:762:5)
    at Interface._tabComplete (node:readline:440:8)
    at [_ttyWrite] [as _ttyWrite] (node:internal/readline/interface:1319:31)
    at REPLServer.self._ttyWrite (node:repl:1029:11)

Node.js v18.4.0

Additional information

Now I'm working on this. I'll send a PR in later.

@VoltrexKeyva VoltrexKeyva added the repl Issues and PRs related to the REPL subsystem. label Jun 22, 2022
@BridgeAR BridgeAR added the confirmed-bug Issues with confirmed bugs. label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants