From f6e7648f6126ffe087071531f03c674be32930f1 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 20 Aug 2019 19:19:52 +0200 Subject: 2019-08-20 17:28:00 --- tex/context/base/mkiv/typo-ovl.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tex/context/base/mkiv/typo-ovl.lua') diff --git a/tex/context/base/mkiv/typo-ovl.lua b/tex/context/base/mkiv/typo-ovl.lua index 6f836551d..25b1a0178 100644 --- a/tex/context/base/mkiv/typo-ovl.lua +++ b/tex/context/base/mkiv/typo-ovl.lua @@ -34,6 +34,8 @@ local setattrlist = nuts.setattrlist local getfield = nuts.getfield local setfont = nuts.setfont +local nextnode = nuts.traversers.node + local unsetvalue = attributes.unsetvalue local prvattribute = attributes.private @@ -90,9 +92,9 @@ end attributes.tooverloads = tooverloads function attributes.applyoverloads(specification,start,stop) - local current = tonut(start) + local start = tonut(start) local processor = specification.processor - local overloads = specification.processor or getattr(current,a_overloads) + local overloads = specification.processor or getattr(start,a_overloads) if overloads and overloads ~= unsetvalue then overloads = t_overloads[overloads] if not overloads then @@ -107,7 +109,7 @@ function attributes.applyoverloads(specification,start,stop) local newlist = nil local newfont = overloads.font - local function apply() + local function apply(current) local a = getattrlist(current) if a == oldlist then setattrlist(current,newlist) @@ -127,12 +129,11 @@ function attributes.applyoverloads(specification,start,stop) end end - while current do - local id = getid(current) + for current, id in nextnode, start do if id == glyph_code then - apply() + apply(current) elseif id == disc_code then - apply() + apply(current) if pre then while pre do if getid(pre) == glyph_code then @@ -161,7 +162,6 @@ function attributes.applyoverloads(specification,start,stop) if current == last then break end - current = getnext(current) end end -- cgit v1.2.3