Skip to content

Commit

Permalink
Merge pull request #122 from jline/fix-off-by-one-history-display
Browse files Browse the repository at this point in the history
history index display is off-by-one
  • Loading branch information
gnodet committed May 11, 2017
2 parents 346cf06 + c8b3c0c commit 13d6722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtins/src/main/java/org/jline/builtins/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static void history(LineReader reader, PrintStream out, PrintStream err,
AttributedStringBuilder sb = new AttributedStringBuilder();
sb.append(" ");
sb.style(AttributedStyle.BOLD);
sb.append(String.format("%3d", entry.index()));
sb.append(String.format("%3d", entry.index() + 1));
sb.style(AttributedStyle.DEFAULT);
if (opt.isSet("d")) {
sb.append(" ");
Expand Down

0 comments on commit 13d6722

Please sign in to comment.