diff options
Diffstat (limited to 'tex/context/base/mkiv/trac-deb.lua')
-rw-r--r-- | tex/context/base/mkiv/trac-deb.lua | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua index 3770f4189..782be154f 100644 --- a/tex/context/base/mkiv/trac-deb.lua +++ b/tex/context/base/mkiv/trac-deb.lua @@ -337,26 +337,22 @@ local function trace_calls(n) trace_calls = function() end end -if LUATEXVERSION > 0.98 then +local editor = [[scite "-open:%filename%" -goto:%linenumber%]] - local editor = [[scite "-open:%filename%" -goto:%linenumber%]] - - directives.register("system.editor",function(v) - editor = v - end) - - callback.register("call_edit",function(filename,linenumber) - if editor then - editor = gsub(editor,"%%s",filename) - editor = gsub(editor,"%%d",linenumber) - editor = gsub(editor,"%%filename%%",filename) - editor = gsub(editor,"%%linenumber%%",linenumber) - logs.report("system","starting editor: %s",editor) - os.execute(editor) - end - end) +directives.register("system.editor",function(v) + editor = v +end) -end +callback.register("call_edit",function(filename,linenumber) + if editor then + editor = gsub(editor,"%%s",filename) + editor = gsub(editor,"%%d",linenumber) + editor = gsub(editor,"%%filename%%",filename) + editor = gsub(editor,"%%linenumber%%",linenumber) + logs.report("system","starting editor: %s",editor) + os.execute(editor) + end +end) directives.register("system.tracecalls", function(n) trace_calls(n) end) -- indirect is needed for nilling |