debugger: repeat command functionality
This commit is contained in:
parent
074af67dd3
commit
a3c4e17c2a
@ -351,10 +351,15 @@ function Interface() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
term.on('line', function(cmd) {
|
term.on('line', function(cmd) {
|
||||||
|
|
||||||
// trim whitespace
|
// trim whitespace
|
||||||
cmd = cmd.replace(/^\s*/, '').replace(/\s*$/, '');
|
cmd = cmd.replace(/^\s*/, '').replace(/\s*$/, '');
|
||||||
self.handleCommand(cmd);
|
|
||||||
|
if (cmd.length) {
|
||||||
|
self._lastCommand = cmd;
|
||||||
|
self.handleCommand(cmd);
|
||||||
|
} else {
|
||||||
|
self.handleCommand(self._lastCommand);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user