tmux: remove redundant event_del()/evtimer_del()

event_add(3) automatically replaces any pending timeout for an existing
event, making explicit event_del() / evtimer_del() calls immediately
before event_add() / evtimer_add() unnecessary.

OK nicm@
This commit is contained in:
bket
2026-10-16 11:34:49 +00:00
committed by tmux update bot
parent 5965228c1f
commit 00bddc8893
4 changed files with 4 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window.c,v 1.386 2026/10/13 10:21:58 nicm Exp $ */
/* $OpenBSD: window.c,v 1.387 2026/10/16 11:34:49 bket Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2667,7 +2667,6 @@ window_pane_scrollbar_start_timer(struct window_pane *wp)
"pane-scrollbars-timeout");
tv.tv_sec = delay / 1000;
tv.tv_usec = (delay % 1000) * 1000L;
evtimer_del(&wp->sb_auto_timer);
evtimer_add(&wp->sb_auto_timer, &tv);
}