Merge pull request #743 from takase1121/better-logview

multiple improvements to logging
This commit is contained in:
Adam
2022-01-18 23:25:36 -05:00
committed by GitHub
6 changed files with 82 additions and 46 deletions
-18
View File
@@ -42,24 +42,6 @@ keymap.add {
["menu"] = "context:show"
}
local function copy_log()
local item = core.active_view.hovered_item
if item then
system.set_clipboard(core.get_log(item))
end
end
local function open_as_doc()
local doc = core.open_doc("logs.txt")
core.root_view:open_doc(doc)
doc:insert(1, 1, core.get_log())
end
menu:register("core.logview", {
{ text = "Copy entry", command = copy_log },
{ text = "Open as file", command = open_as_doc }
})
if require("plugins.scale") then
menu:register("core.docview", {
{ text = "Cut", command = "doc:cut" },