diff options
author | garret <garret@airmail.cc> | 2021-04-25 01:02:39 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2021-04-25 01:02:39 +0100 |
commit | ed1c63d6452c755d6e7b3b42a0bd237f220f9a50 (patch) | |
tree | f2ccb27173648e2ff4f206c63c1b8c65b926fad0 | |
parent | 660dccea48b128b6d2af1861f48c2dd760e455b6 (diff) | |
download | aegisub-scripts-ed1c63d6452c755d6e7b3b42a0bd237f220f9a50.tar.gz aegisub-scripts-ed1c63d6452c755d6e7b3b42a0bd237f220f9a50.tar.bz2 aegisub-scripts-ed1c63d6452c755d6e7b3b42a0bd237f220f9a50.zip |
[Dupe and Comment] put the menu items in sub-menu
-rw-r--r-- | dupe-and-comment.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/dupe-and-comment.lua b/dupe-and-comment.lua index e554c29..97b71dd 100644 --- a/dupe-and-comment.lua +++ b/dupe-and-comment.lua @@ -1,7 +1,7 @@ script_name="Dupe and Comment" script_description="Copies a line and comments out the original." script_author = "garret" -script_version = "2021-04-10" +script_version = "2021-04-11" include("utils.lua") -- i like seeing the original while editing, and being able to go back to it easily @@ -20,10 +20,7 @@ function undo(subs, sel) for i=#sel,1,-1 do local edit=subs[sel[i]] local original=subs[sel[i]+1] - --aegisub.log("Edit\nindex = "..i..", text = "..edit.text.."\n") - --aegisub.log("Original\nindex = "..(i + 1)..", text = "..original.text.."\n") if edit.comment == false and original.comment == true then - original.comment = false subs[sel[i]+1] = original subs.delete(sel[i]) @@ -32,5 +29,5 @@ function undo(subs, sel) aegisub.set_undo_point("Undo "..script_name) end -aegisub.register_macro(script_name, script_description, comment) -aegisub.register_macro(script_name.." - Undo", "Uncomments a line and restores the original", undo) +aegisub.register_macro(script_name.."/Do", script_description, comment) +aegisub.register_macro(script_name.."/Undo", "Deletes selected line and restores the original", undo) |