TypesettingTools / Aegisub-Motion

Lua plugin for Aegisub auto4 that parses motion tracking data and applies it to selected subtitles.
Other
172 stars 23 forks source link

LineCollection flexibility improvements #20

Closed line0 closed 9 years ago

line0 commented 9 years ago

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.