dupe and comment: variable names that make sense

This commit is contained in:
garret 2022-12-15 12:08:27 +00:00
parent b7f820a226
commit d8a867c9ec
1 changed files with 4 additions and 4 deletions

View File

@ -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 = "2.1.1"
script_version = "2.1.2"
script_namespace = "garret.dupe-and-comment"
local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl")
@ -19,10 +19,10 @@ end
local function comment(subs, sel)
for i=#sel,1,-1 do
local line=subs[sel[i]]
local dupe = util.copy(line)
local original = util.copy(line)
line.comment = false -- going to edit it, so we probably want to see it on the video
dupe.comment = true -- this is the actual original one
subs.insert(sel[i]+1,dupe) -- putting it on the next line so i don't have to change line
original.comment = true -- this is the actual original one
subs.insert(sel[i]+1, original) -- putting it on the next line so i don't have to change line
end
aegisub.set_undo_point(script_name)
end