Skip to content

[Bug] Renaming styles in use modifies subtitle text containing lua script #190

Description

@SpecialRecord

Bug
Renaming and doing a bulk replacement of a style currently in use via the Style Editor causes Aegisub to unexpectedly modify any lua script present in Text.

Steps to Reproduce

  1. Have one or more lines where the Text contains lua script. Line format can be Comment or Dialogue.
  2. Access the Style Editor either via the Styles Manager or the Edit button in the main window.
  3. If accessing via Styles Manager, select a style that is currently in use. Rename the style into anything.
  4. Attempt to save the new style name by clicking either OK or Apply.
  5. The dialogue "Do you want to change all instances of this style to this new name?" appears. Click Yes to trigger to change.
  6. Aegisub will then appear to delete certain portions of any lua script present in Text.

Sample File for Replication
I have uploaded a small file for ease of understanding.
The file contains 3 styles "a", "b", and "c".
The file also contains two text lines.

  • Line 1 is a Comment using style "a" containing a line of lua script.
  • Line 2 is a Dialogue using style "b" containing an identical line of lua script.

The following behaviors are observed.

  • Rename and bulk replace style "a" --> lua scripts for both lines 1 and 2 are affected, even though style renaming only affects line 1.
  • Rename and bulk replace style "b" --> lua scripts for both lines 1 and 2 are affected, even though style renaming only affects line 2.
  • Rename style "c" --> no bug as no bulk replace is triggered since style "c" is not in use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions