blob: 119be8d3dddd4e96e78b95154cdc8f784c3a0420 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
local core = require "core"
local keymap = require "core.keymap"
local command = require "core.command"
local common = require "core.common"
local config = require "core.config"
local style = require "core.style"
local View = require "core.view"
local function new_node() {
return { input = "" }
}
local nodes = {
new_node()
}
local ReplView = View:extend()
function ReplView:new()
ReplView.super.new(self)
self.scrollable = true
self.brightness = 0
-- self:begin_search(text, fn)
end
local function begin_repl()
local rv = ReplView()
core.root_view:get_active_node():add_view(rv)
end
command.add(nil, {
["repl:open"] = function()
begin_repl()
end
})
|