aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-02-16 02:45:32 +0000
committergarret <garret@airmail.cc>2023-02-16 02:56:42 +0000
commit6a8427c7c28bcf2ae06d4c523ef32059dd70d715 (patch)
treec17da0acaff97864083ce5ab378cb97e002d67f5 /macros
parente96933c17a25d6a4a90e35d68ab3d2f40a4ec8f9 (diff)
downloadaegisub-scripts-6a8427c7c28bcf2ae06d4c523ef32059dd70d715.tar.gz
aegisub-scripts-6a8427c7c28bcf2ae06d4c523ef32059dd70d715.tar.bz2
aegisub-scripts-6a8427c7c28bcf2ae06d4c523ef32059dd70d715.zip
dupe and comment: make undo handle comment status the same as do
it no longer cares whether the edit is a comment or not. it now sets the original to whatever the edit was. better for doing stuff with comments etc
Diffstat (limited to 'macros')
-rw-r--r--macros/garret.dupe-and-comment.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/macros/garret.dupe-and-comment.lua b/macros/garret.dupe-and-comment.lua
index e89d774..8b00b75 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 = "4.0.0"
+script_version = "5.0.0"
script_namespace = "garret.dupe-and-comment"
local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl")
@@ -64,8 +64,8 @@ local function undo(subs, sel, act)
if not (sel[i] + 1 > #subs) then -- preventing out-of-range errors
local original=subs[sel[i]+1]
- if edit.comment == false and original.comment == true then
- original.comment = false
+ if original.comment == true then
+ original.comment = edit.comment
-- deal with being at the start/end of a fold
local at_fold_end = find_fold_boundary(edit)