summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/typo-dir.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/typo-dir.lua')
-rw-r--r--tex/context/base/mkiv/typo-dir.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/typo-dir.lua b/tex/context/base/mkiv/typo-dir.lua
index 7fbf5f6d3..88c84bd02 100644
--- a/tex/context/base/mkiv/typo-dir.lua
+++ b/tex/context/base/mkiv/typo-dir.lua
@@ -45,8 +45,9 @@ local band = bit32.band
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
-local getnext = nodes.getnext
-local getattr = nodes.getattr
+local nuts = nodes.nuts
+local getnext = nuts.getnext
+local getattr = nuts.getattr
local enableaction = nodes.tasks.enableaction
local tracers = nodes.tracers
@@ -165,24 +166,24 @@ local stoptiming = statistics.stoptiming
--
-- \enabledirectives[typesetters.directions.onetoo]
-function directions.handler(head,_,_,_,direction)
+function directions.handler(head,where,_,_,direction)
local only_one = not getnext(head)
if only_one and not one_too then
- return head, false
+ return head
end
local attr = getattr(head,a_directions)
if not attr or attr == 0 then
- return head, false
+ return head
end
local method = getmethod(attr)
local handler = handlers[method]
if not handler then
- return head, false
+ return head
end
starttiming(directions)
- local head, done = handler(head,direction,only_one)
+ head = handler(head,direction,only_one,where)
stoptiming(directions)
- return head, done
+ return head
end
statistics.register("text directions", function()