From ecb9c46b957e0ee282f79fc1832d4e5ee207304a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Jun 2025 12:35:23 +0530 Subject: [PATCH] ... --- tools/tui/loop/run.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/tui/loop/run.go b/tools/tui/loop/run.go index f97cabceb..76aaca346 100644 --- a/tools/tui/loop/run.go +++ b/tools/tui/loop/run.go @@ -557,10 +557,7 @@ func (self *Loop) run() (err error) { } var timeout time.Duration if len(self.timers) > 0 { - timeout = self.timers[0].deadline.Sub(now) - if timeout < 0 { - timeout = 0 - } + timeout = max(0, self.timers[0].deadline.Sub(now)) } timeout_chan = time.After(timeout) }