mirror of https://github.com/nodejs/node.git
debugger: repeat command functionality
parent
074af67dd3
commit
a3c4e17c2a
|
@ -351,10 +351,15 @@ function Interface() {
|
|||
});
|
||||
|
||||
term.on('line', function(cmd) {
|
||||
|
||||
// trim whitespace
|
||||
cmd = cmd.replace(/^\s*/, '').replace(/\s*$/, '');
|
||||
self.handleCommand(cmd);
|
||||
|
||||
if (cmd.length) {
|
||||
self._lastCommand = cmd;
|
||||
self.handleCommand(cmd);
|
||||
} else {
|
||||
self.handleCommand(self._lastCommand);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue