Do not erase info separator before redrawing it

pull/3062/head
Junegunn Choi 2 years ago
parent 46877e0a92
commit 2ba68d24f2
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -1220,11 +1220,13 @@ func (t *Terminal) printInfo() {
line := t.promptLine()
switch t.infoStyle {
case infoDefault:
t.move(line+1, 0, true)
t.move(line+1, 0, t.separatorLen == 0)
if t.reading {
duration := int64(spinnerDuration)
idx := (time.Now().UnixNano() % (duration * int64(len(t.spinner)))) / duration
t.window.CPrint(tui.ColSpinner, t.spinner[idx])
} else {
t.window.Print(" ") // Clear spinner
}
t.move(line+1, 2, false)
pos = 2
@ -1233,7 +1235,7 @@ func (t *Terminal) printInfo() {
if pos+len(" < ") > t.window.Width() {
return
}
t.move(line, pos, true)
t.move(line, pos, t.separatorLen == 0)
if t.reading {
t.window.CPrint(tui.ColSpinner, " < ")
} else {

Loading…
Cancel
Save