void (MouseWheelEvent event) { final var currentOffset = editor.getScrollingModel().getVerticalScrollOffset(); if (lastOffset == currentOffset) { boundaryReached(event); } else { lastOffset = currentOffset; } }