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", {
|
2022-08-14 01:56:58 +02:00
|
|
|
["command:submit"] = function(active_view)
|
|
|
|
active_view:submit()
|
2019-12-28 12:16:32 +01:00
|
|
|
end,
|
|
|
|
|
2022-08-14 01:56:58 +02:00
|
|
|
["command:complete"] = function(active_view)
|
|
|
|
active_view:complete()
|
2019-12-28 12:16:32 +01:00
|
|
|
end,
|
|
|
|
|
2022-08-14 01:56:58 +02:00
|
|
|
["command:escape"] = function(active_view)
|
|
|
|
active_view:exit()
|
2019-12-28 12:16:32 +01:00
|
|
|
end,
|
|
|
|
|
2022-08-14 01:56:58 +02:00
|
|
|
["command:select-previous"] = function(active_view)
|
|
|
|
active_view:move_suggestion_idx(1)
|
2019-12-28 12:16:32 +01:00
|
|
|
end,
|
|
|
|
|
2022-08-14 01:56:58 +02:00
|
|
|
["command:select-next"] = function(active_view)
|
|
|
|
active_view:move_suggestion_idx(-1)
|
2019-12-28 12:16:32 +01:00
|
|
|
end,
|
|
|
|
})
|