Add command to create a new named Doc

This commit is contained in:
Guldoman 2021-10-10 03:21:49 +02:00 committed by jgmdev
parent 0e323f4a35
commit fb4a5f3828
1 changed files with 9 additions and 0 deletions

View File

@ -103,6 +103,15 @@ command.add(nil, {
core.root_view:open_doc(core.open_doc()) core.root_view:open_doc(core.open_doc())
end, end,
["core:new-named-doc"] = function()
core.command_view:enter(
"File name",
function(text)
core.root_view:open_doc(core.open_doc(text))
end
)
end,
["core:open-file"] = function() ["core:open-file"] = function()
local view = core.active_view local view = core.active_view
if view.doc and view.doc.abs_filename then if view.doc and view.doc.abs_filename then