repl: preserve the cursor when redisplaying the prompt on SIGCONT
authorNathan Rajlich <nathan@tootallnate.net>
Mon, 21 May 2012 22:46:57 +0000 (19:46 -0300)
committerNathan Rajlich <nathan@tootallnate.net>
Tue, 22 May 2012 00:09:46 +0000 (21:09 -0300)
Otherwise the cursor position was being reset to 0, even when there was
already part of a line, which was strange.

Part of #3295.

lib/repl.js

index 889a9f0..26f081c 100644 (file)
@@ -306,7 +306,7 @@ function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) {
   });
 
   rli.on('SIGCONT', function() {
-    self.displayPrompt();
+    self.displayPrompt(true);
   });
 
   self.displayPrompt();