Fix regression where empty preview content is not displayed

This commit is contained in:
Junegunn Choi 2020-10-23 23:52:05 +09:00
parent 69dffd78a6
commit a1f06ae27f
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -1845,9 +1845,7 @@ func (t *Terminal) Loop() {
lines = append(lines, line)
}
if err != nil {
if len(lines) > 0 {
t.reqBox.Set(reqPreviewDisplay, previewResult{version, lines, offset, ""})
}
t.reqBox.Set(reqPreviewDisplay, previewResult{version, lines, offset, ""})
break Loop
}
}