From 492f37d9d4bea72995f368824b1b9e238bf4cd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=9B=E7=89=8C=E7=96=AF=E5=AD=90?= Date: Thu, 8 Oct 2015 17:43:22 +0800 Subject: [PATCH] fixed default history limit count error The default history limit count will be 0 if cfg not set. Which will make history lose efficacy. --- readline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readline.go b/readline.go index cd075f4..dc49ff1 100644 --- a/readline.go +++ b/readline.go @@ -40,7 +40,7 @@ func (c *Config) Init() error { if c.Stderr == nil { c.Stderr = Stderr } - if c.HistoryLimit < 0 { + if c.HistoryLimit <= 0 { c.HistoryLimit = 500 } return nil