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: don’t write to input stream in editor mode #9207

Closed
wants to merge 3 commits into from

Commits on Oct 20, 2016

  1. repl: make key of repl.write() optional always

    In `.editor` mode, `repl.write()` would have crashed when the
    `key` argument was not present, because the overwritten
    `_ttyWrite` of REPLs doesn’t check for the absence of a second
    argument like `readline.write()` does.
    
    Since the docs indicate that the argument is optional, add
    a check paralleling the one in `readline.write()`.
    addaleax committed Oct 20, 2016
    Configuration menu
    Copy the full SHA
    37c9d87 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d197827 View commit details
    Browse the repository at this point in the history
  3. repl: don’t write to input stream in editor mode

    Instead of writing to the REPL’s input stream for the alignment
    spaces in `.editor` mode, let `readline` handle the spaces
    properly (echoing them using `_ttyWrite` and adding them to the
    current line buffer).
    
    Fixes: nodejs#9189
    addaleax committed Oct 20, 2016
    Configuration menu
    Copy the full SHA
    979528d View commit details
    Browse the repository at this point in the history