diff options
author | garret <garret@airmail.cc> | 2022-11-24 22:57:43 +0000 |
---|---|---|
committer | garret <garret@airmail.cc> | 2022-11-24 22:57:43 +0000 |
commit | 66e0d1f8a7136cbaa229ac8afbb6987da132d0d7 (patch) | |
tree | d56e9b5a48769937fa8d5a813fb2761b849db60d | |
parent | 2ec8caee589c8c4d89da48fc25dd0005d9cebe03 (diff) | |
download | aegisub-scripts-66e0d1f8a7136cbaa229ac8afbb6987da132d0d7.tar.gz aegisub-scripts-66e0d1f8a7136cbaa229ac8afbb6987da132d0d7.tar.bz2 aegisub-scripts-66e0d1f8a7136cbaa229ac8afbb6987da132d0d7.zip |
dupe and comment: use local functions
-rw-r--r-- | macros/garret.dupe-and-comment.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/macros/garret.dupe-and-comment.lua b/macros/garret.dupe-and-comment.lua index c74d6c6..7c3e31d 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 = "2.1.0" +script_version = "2.1.1" script_namespace = "garret.dupe-and-comment" local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl") @@ -16,7 +16,7 @@ else util = require 'aegisub.util' end -function comment(subs, sel) +local function comment(subs, sel) for i=#sel,1,-1 do local line=subs[sel[i]] local dupe = util.copy(line) @@ -27,7 +27,7 @@ function comment(subs, sel) aegisub.set_undo_point(script_name) end -function undo(subs, sel) +local function undo(subs, sel) for i=#sel,1,-1 do local edit=subs[sel[i]] local original=subs[sel[i]+1] |