2019-12-28 12:16:32 +01:00
|
|
|
local core = require "core"
|
|
|
|
local command = require "core.command"
|
|
|
|
|
2021-06-07 23:00:29 +02:00
|
|
|
command.add("core.commandview", {
|
2019-12-28 12:16:32 +01:00
|
|
|
["command:submit"] = function()
|
|
|
|
core.active_view:submit()
|
|
|
|
end,
|
|
|
|
|
|
|
|
["command:complete"] = function()
|
|
|
|
core.active_view:complete()
|
|
|
|
end,
|
|
|
|
|
|
|
|
["command:escape"] = function()
|
|
|
|
core.active_view:exit()
|
|
|
|
end,
|
|
|
|
|
|
|
|
["command:select-previous"] = function()
|
|
|
|
core.active_view:move_suggestion_idx(1)
|
|
|
|
end,
|
|
|
|
|
|
|
|
["command:select-next"] = function()
|
|
|
|
core.active_view:move_suggestion_idx(-1)
|
|
|
|
end,
|
|
|
|
})
|