dupe and comment: variable names that make sense
This commit is contained in:
parent
b7f820a226
commit
d8a867c9ec
|
@ -1,7 +1,7 @@
|
||||||
script_name="Dupe and Comment"
|
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_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_author = "garret"
|
||||||
script_version = "2.1.1"
|
script_version = "2.1.2"
|
||||||
script_namespace = "garret.dupe-and-comment"
|
script_namespace = "garret.dupe-and-comment"
|
||||||
|
|
||||||
local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl")
|
local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl")
|
||||||
|
@ -19,10 +19,10 @@ end
|
||||||
local function comment(subs, sel)
|
local function comment(subs, sel)
|
||||||
for i=#sel,1,-1 do
|
for i=#sel,1,-1 do
|
||||||
local line=subs[sel[i]]
|
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
|
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
|
original.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
|
subs.insert(sel[i]+1, original) -- putting it on the next line so i don't have to change line
|
||||||
end
|
end
|
||||||
aegisub.set_undo_point(script_name)
|
aegisub.set_undo_point(script_name)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue