From 47ce6828211e868d8e3c55f2ee4a274e06a05a9c Mon Sep 17 00:00:00 2001 From: Jonathan Schuster Date: Wed, 29 Apr 2026 21:06:02 +0200 Subject: [PATCH] fix: K key re-jumping to same section instead of advancing The forward-skip threshold was `cur + 0.5`, which is smaller than the preroll offset applied when landing on a section. After K placed the cursor at `s.start - preroll`, the next K press found the same section again because `s.start > (s.start - preroll) + 0.5` is true whenever preroll > 0.5. Using `cur + preroll` as the threshold ensures the current section's start is not > cur + preroll, so only the next section matches. --- web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web.py b/web.py index 9b8db92..73f2bfc 100644 --- a/web.py +++ b/web.py @@ -925,7 +925,7 @@ document.addEventListener('keydown', e => { const cur = audio.currentTime; let jumped = false; for (let i = 0; i < sections.length; i++) { - if (sections[i].start > cur + 0.5) { + if (sections[i].start > cur + preroll) { const s = sections[i]; audio.currentTime = Math.max(0, s.start - preroll); setCutFields(activePlayerIdx, s.start, s.end);