diff --git a/definitions/actions.lua b/definitions/actions.lua index 0038a2d8..1150964d 100644 --- a/definitions/actions.lua +++ b/definitions/actions.lua @@ -328,6 +328,8 @@ return { SelectItems = "SelectItemsCrossingTimeAndTrackSelection", SelectItemsUnderEditCursor = "_XENAKIOS_SELITEMSUNDEDCURSELTX", SelectLastOfSelectedTracks = "_XENAKIOS_SELLASTOFSELTRAX", + SelectLastTouchedTrack = 40505, + SetFirstSelectedTrackAsLastTouchedTrack = 40914, SelectNextNote = {40413, midiCommand=true}, SelectNextNoteSamePitch = {40428, midiCommand=true}, SelectNoteClosestToEditCursor = {40426, midiCommand=true}, diff --git a/internal/command/runner.lua b/internal/command/runner.lua index db8d8e58..1d36e6f0 100644 --- a/internal/command/runner.lua +++ b/internal/command/runner.lua @@ -110,7 +110,6 @@ function runner.extendTrackSelection(movement, args) movement(table.unpack(args)) local end_pos = runner.getTrackPosition() local pivot_i = state_functions.getVisualTrackPivotIndex() - log.user("end: " .. end_pos .. " pivot_i: " .. pivot_i) runner.runAction("UnselectTracks") @@ -141,8 +140,8 @@ function runner.getTrackPosition() end runner.runAction("UnselectTracks") - runner.runAction("NextTrack") - runner.runAction("PrevTrack") + runner.runAction("SelectLastTouchedTrack") + local track_at_index = reaper.GetSelectedTrack(0, 0) local index = reaper.GetMediaTrackInfo_Value(track_at_index, "IP_TRACKNUMBER") - 1