15 lines
333 B
Lua
15 lines
333 B
Lua
|
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())
|
||
|
end,
|
||
|
["log:copy-to-clipboard"] = function()
|
||
|
system.set_clipboard(core.get_log())
|
||
|
end
|
||
|
})
|