From c07edd90f5bfb4edb98b57e76e56742e08142b91 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 9 Dec 2011 15:24:15 +0600 Subject: preserve cursor pos * configurable via .prompt()'s preserveCursor argument (false by default) --- lib/repl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/repl.js') diff --git a/lib/repl.js b/lib/repl.js index 3a5ac4346e..2c3baeba28 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -282,11 +282,11 @@ REPLServer.prototype.resetContext = function(force) { this.context = context; }; -REPLServer.prototype.displayPrompt = function() { +REPLServer.prototype.displayPrompt = function(preserveCursor) { this.rli.setPrompt(this.bufferedCommand.length ? '...' + new Array(this.lines.level.length).join('..') + ' ' : this.prompt); - this.rli.prompt(); + this.rli.prompt(preserveCursor); }; -- cgit v1.2.1