fix: empty multiline prompt if entire prompt is single line

windows-fixes
TorchedSammy 2022-03-13 16:42:14 -04:00
parent 5e505d0a8d
commit 7d9c7ddf18
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 1 additions and 0 deletions

1
rl.go
View File

@ -192,6 +192,7 @@ func (lr *lineReader) SetPrompt(p string) {
lr.rl.MultilinePrompt = halfPrompt[len(halfPrompt) - 1:][0] lr.rl.MultilinePrompt = halfPrompt[len(halfPrompt) - 1:][0]
} else { } else {
lr.rl.Multiline = false lr.rl.Multiline = false
lr.rl.MultilinePrompt = ""
lr.rl.SetPrompt(p) lr.rl.SetPrompt(p)
} }
if initialized && !running { if initialized && !running {