debugger: repeat command functionality

pull/22966/head
Ryan Dahl 2010-12-30 11:54:49 -08:00
parent 074af67dd3
commit a3c4e17c2a
1 changed files with 7 additions and 2 deletions

View File

@ -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);
}
});
}