Use new CommandView:enter options table
This commit is contained in:
@@ -4,11 +4,13 @@ local common = require "core.common"
|
||||
|
||||
command.add(nil, {
|
||||
["files:create-directory"] = function()
|
||||
core.command_view:enter("New directory name", function(text)
|
||||
local success, err, path = common.mkdirp(text)
|
||||
if not success then
|
||||
core.error("cannot create directory %q: %s", path, err)
|
||||
core.command_view:enter("New directory name", {
|
||||
submit = function(text)
|
||||
local success, err, path = common.mkdirp(text)
|
||||
if not success then
|
||||
core.error("cannot create directory %q: %s", path, err)
|
||||
end
|
||||
end
|
||||
end)
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user