summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-11-25 23:50:12 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-11-25 23:51:49 +0900
commit2ba68d24f21f86e3bed7a0e4f7d65abadef0d2ef (patch)
tree4bd4a7f250ac8742945c4ea87b97d954a79af519
parent46877e0a92d5e18bfc143ac98bb55b22eaef81ac (diff)
downloadfzf-2ba68d24f21f86e3bed7a0e4f7d65abadef0d2ef.tar.gz
Do not erase info separator before redrawing it
-rw-r--r--src/terminal.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/terminal.go b/src/terminal.go
index f8338c65..e12c980c 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -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 {