A workaround for the time being is this script:
Code:
reaper.Main_OnCommand(40930, 0) -- Remove content (trim) behind items
reaper.Undo_OnStateChange("Remove content (trim) behind items")
BTW.. Why the above code works but the following doesn't?
Code:
reaper.Undo_BeginBlock()
reaper.Main_OnCommand(40930, 0) -- Remove content (trim) behind items
reaper.Undo_EndBlock( "Remove content (trim) behind items", 4)