diff options
author | garret <garret@airmail.cc> | 2023-02-16 01:34:39 +0000 |
---|---|---|
committer | garret <garret@airmail.cc> | 2023-02-16 02:55:04 +0000 |
commit | 0c146cd4304622373c9b10980a7d4149a9ed5208 (patch) | |
tree | ae62865ccc9e79d03cc5fee9dc6bdea156c66e59 /macros/garret.dupe-and-comment.lua | |
parent | 3159a91f20d44f739c7f20f6602f10fb2e6cd8e1 (diff) | |
download | aegisub-scripts-0c146cd4304622373c9b10980a7d4149a9ed5208.tar.gz aegisub-scripts-0c146cd4304622373c9b10980a7d4149a9ed5208.tar.bz2 aegisub-scripts-0c146cd4304622373c9b10980a7d4149a9ed5208.zip |
dupe and comment: make variable names more informative
Diffstat (limited to 'macros/garret.dupe-and-comment.lua')
-rw-r--r-- | macros/garret.dupe-and-comment.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/macros/garret.dupe-and-comment.lua b/macros/garret.dupe-and-comment.lua index 198a905..19f97a0 100644 --- a/macros/garret.dupe-and-comment.lua +++ b/macros/garret.dupe-and-comment.lua @@ -1,7 +1,7 @@ script_name="Dupe and Comment" script_description="Copies a line and comments out the original.\nbecause i like seeing the original while editing, and being able to go back to it easily" script_author = "garret" -script_version = "3.0.1" +script_version = "3.0.2" script_namespace = "garret.dupe-and-comment" local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl") @@ -13,11 +13,12 @@ end local function comment(subs, sel, act) for i=#sel,1,-1 do - local line=subs[sel[i]] -- grab copy of current line + local edit=subs[sel[i]] -- current line + local original=subs[sel[i]] -- and a copy of it -- now use that copy for a different line - line.comment = true -- comment out the new dupe line - subs.insert(sel[i]+1, line) -- and put it below + original.comment = true -- comment out the new dupe line + subs.insert(sel[i]+1, original) -- and put it below -- if #sel > 1 then -- sort out sel/act |