Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: tools/ddbg/lib/commando.dart

Issue 82823007: Fix a bug with command line history. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698