Chromium Code Reviews| Index: tools/ddbg/lib/commando.dart |
| =================================================================== |
| --- tools/ddbg/lib/commando.dart (revision 30585) |
| +++ tools/ddbg/lib/commando.dart (working copy) |
| @@ -424,7 +424,9 @@ |
| } |
| void _historyNext() { |
| - if (_linePos == (_lines.length - 1)) { |
| + // For the very first command, _linePos (0) will exceed |
| + // (_lines.length - 1) (-1) so we use a ">=" here instead of an "==". |
| + if (_linePos >= (_lines.length - 1)) { |
| return; |
| } |