projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41a4182
)
repeat last command if empty line was entered
author
Fedor Indutny
<fedor.indutny@gmail.com>
Tue, 20 Sep 2011 10:05:01 +0000
(17:05 +0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Tue, 20 Sep 2011 15:35:15 +0000
(08:35 -0700)
lib/_debugger.js
patch
|
blob
|
history
diff --git
a/lib/_debugger.js
b/lib/_debugger.js
index
3e28a3f
..
4deb0ec
100644
(file)
--- a/
lib/_debugger.js
+++ b/
lib/_debugger.js
@@
-852,6
+852,13
@@
Interface.prototype.requireConnection = function() {
// Used for debugger's commands evaluation and execution
Interface.prototype.controlEval = function(code, context, filename, callback) {
try {
+ // Repeat last command if empty line are going to be evaluated
+ if (this.repl.rli.history.length > 0) {
+ if (code === '(undefined\n)') {
+ code = '(' + this.repl.rli.history[0] + '\n)';
+ }
+ }
+
var result = vm.runInContext(code, context, filename);
// Repl should not ask for next command