mirror of https://github.com/chzyer/readline.git
NewEx: fix panic if cfg.Painter is not given (#129)
This commit is contained in:
parent
c6c3e8d906
commit
aa9ed7db49
|
@ -161,6 +161,9 @@ func NewEx(cfg *Config) (*Instance, error) {
|
|||
return nil, err
|
||||
}
|
||||
rl := t.Readline()
|
||||
if cfg.Painter == nil {
|
||||
cfg.Painter = &defaultPainter{}
|
||||
}
|
||||
return &Instance{
|
||||
Config: cfg,
|
||||
Terminal: t,
|
||||
|
|
Loading…
Reference in New Issue