Skip to content
Extraits de code Groupes Projets
Valider d7f962e2 rédigé par Niels Martin Hansen's avatar Niels Martin Hansen
Parcourir les fichiers

tenv.basesyl was set incorrectly

Originally committed to SVN as r1655.
parent e288aa68
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -475,6 +475,7 @@ function apply_line(meta, styles, subs, line, templates, tenv) ...@@ -475,6 +475,7 @@ function apply_line(meta, styles, subs, line, templates, tenv)
for i = 1, line.kara.n do for i = 1, line.kara.n do
local syl = line.kara[i] local syl = line.kara[i]
tenv.syl = syl tenv.syl = syl
tenv.basesyl = syl
set_ctx_syl(varctx, line, syl) set_ctx_syl(varctx, line, syl)
newline.text = newline.text .. run_text_template(t.t, tenv, varctx) newline.text = newline.text .. run_text_template(t.t, tenv, varctx)
if t.addtext then if t.addtext then
...@@ -595,6 +596,7 @@ function apply_syllable_templates(syl, line, templates, tenv, varctx, subs) ...@@ -595,6 +596,7 @@ function apply_syllable_templates(syl, line, templates, tenv, varctx, subs)
-- Loop over all templates matching the line style -- Loop over all templates matching the line style
for t in matching_templates(templates, line, tenv) do for t in matching_templates(templates, line, tenv) do
tenv.syl = syl tenv.syl = syl
tenv.basesyl = syl
set_ctx_syl(varctx, line, syl) set_ctx_syl(varctx, line, syl)
if apply_one_syllable_template(syl, line, t, tenv, varctx, subs, false, false) then if apply_one_syllable_template(syl, line, t, tenv, varctx, subs, false, false) then
...@@ -638,7 +640,6 @@ function apply_one_syllable_template(syl, line, template, tenv, varctx, subs, sk ...@@ -638,7 +640,6 @@ function apply_one_syllable_template(syl, line, template, tenv, varctx, subs, sk
if not skip_perchar and t.perchar then if not skip_perchar and t.perchar then
aegisub.debug.out(5, "Doing per-character effects...\n") aegisub.debug.out(5, "Doing per-character effects...\n")
local charsyl = table.copy(syl) local charsyl = table.copy(syl)
tenv.basesyl = tenv.basesyl or syl
tenv.syl = charsyl tenv.syl = charsyl
local left, width = syl.left, 0 local left, width = syl.left, 0
...@@ -665,7 +666,6 @@ function apply_one_syllable_template(syl, line, template, tenv, varctx, subs, sk ...@@ -665,7 +666,6 @@ function apply_one_syllable_template(syl, line, template, tenv, varctx, subs, sk
if not skip_multi and t.multi then if not skip_multi and t.multi then
aegisub.debug.out(5, "Doing multi-highlight effects...\n") aegisub.debug.out(5, "Doing multi-highlight effects...\n")
local hlsyl = table.copy(syl) local hlsyl = table.copy(syl)
tenv.basesyl = tenv.basesyl or syl
tenv.syl = hlsyl tenv.syl = hlsyl
for hl = 1, syl.highlights.n do for hl = 1, syl.highlights.n do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter