The selections in Aseprite can be sparse, though (with ctrl-click.) You could probably just find the first and last selected frame and then just iterator over all in that span. For cells, you could then only move them if that cell was selected maybe? I realize now that this could get complex fast because of how flexible selection is in Ase...