debugger: repeat command functionality

This commit is contained in:
Ryan Dahl 2010-12-30 11:54:49 -08:00
parent 074af67dd3
commit a3c4e17c2a

View File

@ -351,10 +351,15 @@ function Interface() {
});
term.on('line', function(cmd) {
// trim whitespace
cmd = cmd.replace(/^\s*/, '').replace(/\s*$/, '');
if (cmd.length) {
self._lastCommand = cmd;
self.handleCommand(cmd);
} else {
self.handleCommand(self._lastCommand);
}
});
}