From d2c662e54f7d5d011d42915c543c265c0f555d97 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 25 Apr 2025 21:30:25 +0900 Subject: [PATCH] Reset coordinator delay on 'reload' Fix #4364 --- src/core.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core.go b/src/core.go index 42add205..961d0d37 100644 --- a/src/core.go +++ b/src/core.go @@ -295,6 +295,7 @@ func Run(opts *Options) (int, error) { // Event coordination reading := true ticks := 0 + startTick := 0 var nextCommand *commandSpec var nextEnviron []string eventBox.Watch(EvtReadNew) @@ -321,6 +322,7 @@ func Run(opts *Options) (int, error) { clearDenylist() } reading = true + startTick = ticks chunkList.Clear() itemIndex = 0 inputRevision.bumpMajor() @@ -509,7 +511,7 @@ func Run(opts *Options) (int, error) { } if delay && reading { dur := util.DurWithin( - time.Duration(ticks)*coordinatorDelayStep, + time.Duration(ticks-startTick)*coordinatorDelayStep, 0, coordinatorDelayMax) time.Sleep(dur) }