fix: create an empty line reader instance for hilbish.read (closes #190)

reuse-runner-2
TorchedSammy 2022-10-10 18:26:54 -04:00
parent b4ca5bfda3
commit 3bec2c91a8
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 3 additions and 1 deletions

4
api.go
View File

@ -263,7 +263,9 @@ func hlread(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
if err != nil {
return nil, err
}
lualr := newLineReader("", true)
lualr := &lineReader{
rl: readline.NewInstance(),
}
lualr.SetPrompt(luaprompt)
input, err := lualr.Read()