From 66e0d1f8a7136cbaa229ac8afbb6987da132d0d7 Mon Sep 17 00:00:00 2001 From: garret Date: Thu, 24 Nov 2022 22:57:43 +0000 Subject: dupe and comment: use local functions --- macros/garret.dupe-and-comment.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'macros') 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] -- cgit v1.2.3-70-g09d2