From 941e1bfb02fcf121fe593cd4150c4a4b6b9dd898 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Wed, 14 Aug 2019 22:35:41 +0200 Subject: [PATCH] readline: y in cursorTo is optional Parameter y in cursorTo() is optional and this is also verified by tests but docs don't state this. Besides that if the newly added parameter callback is used by no y it's quite unhandy. This PR allows to simply omit y. --- doc/api/readline.md | 2 +- doc/api/tty.md | 2 +- lib/readline.js | 5 +++++ test/parallel/test-readline-csi.js | 8 ++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 47dfad8dabb173..43d3a7e8f62dd4 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -487,7 +487,7 @@ function completer(linePartial, callback) { } ``` -## readline.cursorTo(stream, x, y[, callback]) +## readline.cursorTo(stream, x[, y][, callback])