This patch enables LineCollections to do partial deletion and insertion of lines from/into the subtitle object, while keeping the collection and line numbers in sync with the applied changes. This hopefully allows users to keep using the same LineCollection after running deleteLines() or insertLines() without having to worry about the line numbers being off, duplicate insertions/deletions, etc.
Also included is a new getSelection() method, which benefits from the consistent line numbers and can be used to return a new selection and active line from an Aegisub macro.
This patch enables LineCollections to do partial deletion and insertion of lines from/into the subtitle object, while keeping the collection and line numbers in sync with the applied changes. This hopefully allows users to keep using the same LineCollection after running deleteLines() or insertLines() without having to worry about the line numbers being off, duplicate insertions/deletions, etc. Also included is a new getSelection() method, which benefits from the consistent line numbers and can be used to return a new selection and active line from an Aegisub macro.