fix: check if input is 0 on multiline splitting (closes #170)

website
TorchedSammy 2022-06-20 15:35:25 -04:00
parent 226605a996
commit 7e57b3de7d
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 4 additions and 1 deletions

View File

@ -55,7 +55,10 @@ func (rl *Instance) Readline() (string, error) {
// Multisplit // Multisplit
if len(rl.multisplit) > 0 { if len(rl.multisplit) > 0 {
r := []rune(rl.multisplit[0]) r := []rune(rl.multisplit[0])
rl.editorInput(r) if len(r) >= 1 {
rl.editorInput(r)
}
rl.carridgeReturn() rl.carridgeReturn()
if len(rl.multisplit) > 1 { if len(rl.multisplit) > 1 {
rl.multisplit = rl.multisplit[1:] rl.multisplit = rl.multisplit[1:]