Skip to content

Commit

Permalink
Change history default to 99 from 100 so history printed with %02d lo…
Browse files Browse the repository at this point in the history
…oks good (#7)
  • Loading branch information
ldemailly authored Aug 10, 2024
1 parent 07a4a9e commit 6308a8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,8 @@ func NewHistory(capacity int) *stRingBuffer {
}

// DefaultHistoryEntries is the default number of entries in the history.
const DefaultHistoryEntries = 100
// Use 99 (and not 100) so printing History's index 1-99 using %02d looks good.
const DefaultHistoryEntries = 99

func (s *stRingBuffer) Add(a string) {
if s.entries[s.head] == a {
Expand Down

0 comments on commit 6308a8b

Please sign in to comment.