|
|
@ -138,6 +138,8 @@ function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) { |
|
|
|
|
|
|
|
var sawSIGINT = false; |
|
|
|
rli.on('SIGINT', function() { |
|
|
|
rli.output.write('\n'); |
|
|
|
|
|
|
|
if (sawSIGINT) { |
|
|
|
rli.pause(); |
|
|
|
self.emit('exit'); |
|
|
@ -149,10 +151,8 @@ function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) { |
|
|
|
|
|
|
|
if (!(self.bufferedCommand && self.bufferedCommand.length > 0) && |
|
|
|
rli.line.length === 0) { |
|
|
|
rli.output.write('\n(^C again to quit)\n'); |
|
|
|
rli.output.write('(^C again to quit)\n'); |
|
|
|
sawSIGINT = true; |
|
|
|
} else { |
|
|
|
rli.output.write('\n'); |
|
|
|
} |
|
|
|
|
|
|
|
self.bufferedCommand = ''; |
|
|
|