From 6308a8bda4c02853030d2f306480948c8a8af11a Mon Sep 17 00:00:00 2001 From: Laurent Demailly <ldemailly@gmail.com> Date: Sat, 10 Aug 2024 13:07:02 -0700 Subject: [PATCH] Change history default to 99 from 100 so history printed with %02d looks good (#7) --- terminal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terminal.go b/terminal.go index 1c35c6c..5634cbb 100644 --- a/terminal.go +++ b/terminal.go @@ -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 {