mirror of https://github.com/chzyer/readline.git
fixed default history limit count error
The default history limit count will be 0 if cfg not set. Which will make history lose efficacy.
This commit is contained in:
parent
7638a04c39
commit
492f37d9d4
|
@ -40,7 +40,7 @@ func (c *Config) Init() error {
|
||||||
if c.Stderr == nil {
|
if c.Stderr == nil {
|
||||||
c.Stderr = Stderr
|
c.Stderr = Stderr
|
||||||
}
|
}
|
||||||
if c.HistoryLimit < 0 {
|
if c.HistoryLimit <= 0 {
|
||||||
c.HistoryLimit = 500
|
c.HistoryLimit = 500
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue