diff --git a/src/terminal.go b/src/terminal.go index ae56c1fe..cd8d4924 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -4625,11 +4625,7 @@ func (t *Terminal) Loop() error { // U t.uiMutex | t.uiMutex.Lock() t.mutex.Lock() - printInfo := util.RunOnce(func() { - if !t.resizeIfNeeded() { - t.printInfo() - } - }) + info := false for _, key := range keys { req := util.EventType(key) value := (*events)[req] @@ -4637,15 +4633,14 @@ func (t *Terminal) Loop() error { case reqPrompt: t.printPrompt() if t.infoStyle == infoInline || t.infoStyle == infoInlineRight { - printInfo() + info = true } case reqInfo: - printInfo() + info = true case reqList: t.printList() currentIndex := t.currentIndex() focusChanged := focusedIndex != currentIndex - info := false if focusChanged && focusedIndex >= 0 && t.track == trackCurrent { t.track = trackDisabled info = true @@ -4657,9 +4652,6 @@ func (t *Terminal) Loop() error { info = true } } - if info { - printInfo() - } if focusChanged || version != t.version { version = t.version focusedIndex = currentIndex @@ -4751,6 +4743,9 @@ func (t *Terminal) Loop() error { return } } + if info && !t.resizeIfNeeded() { + t.printInfo() + } t.flush() t.mutex.Unlock() t.uiMutex.Unlock()