joyent/node — pull request #7128 by Benjamin-Waters (2014-02-15 19:06:53+00:00)
Title: lib/readline.js: Fix backspace for multi-line(\n)

Add additional parameter to cursorTo in _refreshLine to ensure that
the cursor moves to the top left row as well as the far left column
This prevents multi-line output from repeating previous lines.

Calculate the cursor position relative to the last line by splitting
the prompt text on newline characters.

Fixes joyent/node#6415