Fix --info inline-right not properly clearing the previous output

(seq 100000; sleep 1) | fzf --info inline-right --bind load:change-query:x
This commit is contained in:
Junegunn Choi
2024-05-03 11:56:54 +09:00
parent dba1644518
commit f6aa28c380
2 changed files with 11 additions and 2 deletions

View File

@@ -1715,9 +1715,11 @@ func (t *Terminal) printInfo() {
if t.infoStyle == infoInlineRight {
if len(t.infoPrefix) == 0 {
pos = util.Max(pos, t.window.Width()-util.StringWidth(output)-3)
t.move(line, pos, false)
newPos := util.Max(pos, t.window.Width()-util.StringWidth(output)-3)
t.window.Print(strings.Repeat(" ", newPos-pos))
pos = newPos
if pos < t.window.Width() {
t.move(line, pos, false)
printSpinner()
pos++
}