@@ -47,8 +47,10 @@ function proc_lines(subs, sels, curr)
4747 end
4848 if ret then
4949 -- 成功
50- subs [i ] = line
51- table.insert (normalsels , i )
50+ if line .text ~= subs [i ].text then
51+ subs [i ] = line
52+ table.insert (normalsels , i )
53+ end
5254 else
5355 -- 失败
5456 oline .comment = true
@@ -74,26 +76,26 @@ TLL_macros = {
7476 {
7577 script_name = " 1.插入日字特效" ,
7678 script_description = " 为选中的'中字\\ N日字'格式插入'{\\ fnSource Han Sans JP Bold\\ fs55\\ fsvp10}',并删掉头尾的换行符" ,
77- entry = function (subs ,sel ) switches .insert_jptag = true proc_lines (subs , sel ) end ,
79+ entry = function (subs ,sel ) switches .insert_jptag = true return proc_lines (subs , sel ) end ,
7880 validation = false ,
7981 version = versions .insert_jptag ,
8082 },
8183 {
8284 script_name = " 2.插入模糊阴影(2304)" ,
8385 script_description = " 每行开头插入'\\ blur3\\ yshad2.5\\ xshad1.5'特效" ,
84- entry = function (subs ,sel ) switches .insert_zmsub2304_tags = true proc_lines (subs , sel ) end ,
86+ entry = function (subs ,sel ) switches .insert_zmsub2304_tags = true return proc_lines (subs , sel ) end ,
8587 validation = false ,
8688 version = versions .insert_zmsub2304_tags ,
8789 },
8890 {
8991 script_name = " 3.规范空格、数字宽度" ,
9092 script_description = " 连续的全/半角空格全部替换为一个半角空格;对白只有一位数字则全角,两位以上数字全部半角。" ,
91- entry = function (subs ,sel ) switches .proc_space_digits = true proc_lines (subs , sel ) end ,
93+ entry = function (subs ,sel ) switches .proc_space_digits = true return proc_lines (subs , sel ) end ,
9294 validation = false ,
9395 version = versions .proc_space_digits ,
9496 },
9597}
9698
9799for i = 1 , # TLL_macros do
98- aegisub .register_macro (script_name .. " /" .. TLL_macros [i ].script_name .. " v" .. TLL_macros [i ].version , TLL_macros [i ].script_description , TLL_macros [i ].entry , TLL_macros [i ].validation )
100+ aegisub .register_macro (script_name .. " /" .. TLL_macros [i ].script_name .. " v" .. TLL_macros [i ].version , TLL_macros [i ].script_description , TLL_macros [i ].entry , TLL_macros [i ].validation )
99101end
0 commit comments