2021-12-18 03:51:44 +01:00
|
|
|
local core = require "core"
|
|
|
|
local command = require "core.command"
|
|
|
|
|
|
|
|
|
|
|
|
command.add(nil, {
|
|
|
|
["log:open-as-doc"] = function()
|
|
|
|
local doc = core.open_doc("logs.txt")
|
|
|
|
core.root_view:open_doc(doc)
|
|
|
|
doc:insert(1, 1, core.get_log())
|
2021-12-22 03:54:25 +01:00
|
|
|
doc.new_file = false
|
|
|
|
doc:clean()
|
2021-12-18 03:51:44 +01:00
|
|
|
end,
|
|
|
|
["log:copy-to-clipboard"] = function()
|
|
|
|
system.set_clipboard(core.get_log())
|
|
|
|
end
|
|
|
|
})
|