Compare commits

...

2 Commits

Author SHA1 Message Date
TorchedSammy ce0b2ab955
fix: dont print extra new line on ctrl+d in continue prompt 2021-11-28 10:44:02 -05:00
TorchedSammy 9261253b63
fix: stop interval if error occurs 2021-11-28 09:29:17 -05:00
2 changed files with 2 additions and 3 deletions

4
lua.go
View File

@ -201,8 +201,8 @@ func hshinterval(L *lua.LState) int {
NRet: 0,
Protect: true,
}); err != nil {
fmt.Fprintln(os.Stderr,
"Error in interval function:\n\n", err)
fmt.Fprintln(os.Stderr, "Error in interval function:\n\n", err)
stop <- lua.LTrue // stop the interval
}
case <-stop:
ticker.Stop()

View File

@ -218,7 +218,6 @@ func ContinuePrompt(prev string) (string, error) {
lr.SetPrompt(multilinePrompt)
cont, err := lr.Read()
if err != nil {
fmt.Println("")
return "", err
}
cont = strings.TrimSpace(cont)