Commands refactor (#257)

* remove unecessary check

* move command registration to core/commands
This commit is contained in:
Takase
2021-06-07 23:00:29 +02:00
committed by GitHub
parent 130b29438a
commit 0fd1fa8872
3 changed files with 36 additions and 40 deletions
+1 -7
View File
@@ -1,13 +1,7 @@
local core = require "core"
local command = require "core.command"
local CommandView = require "core.commandview"
local function has_commandview()
return core.active_view:is(CommandView)
end
command.add(has_commandview, {
command.add("core.commandview", {
["command:submit"] = function()
core.active_view:submit()
end,