diff --git a/Sources/VLSheetViewSelection.mm b/Sources/VLSheetViewSelection.mm index 79bf75a..65b035c 100644 --- a/Sources/VLSheetViewSelection.mm +++ b/Sources/VLSheetViewSelection.mm @@ -36,6 +36,8 @@ static VLSong sPasteboard; // Fall through // case kRegionMeasure: + fCursorMeasure = + std::max(0, std::min(fCursorMeasure, [self song]->CountMeasures())); if (fCursorMeasure > fSelEnd) { fSelEnd = fCursorMeasure; [self setNeedsDisplay:YES];