minor bug fixes

This commit is contained in:
kepler155c@gmail.com
2020-04-27 22:31:57 -06:00
parent ef0886ec85
commit 8a9878b8e5
6 changed files with 26 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
local ccemux = _G.ccemux
local fs = _G.fs
local peripheral = _G.peripheral
local textutils = _G.textutils
if ccemux then
-- add a System setup tab
@@ -13,4 +14,16 @@ if ccemux then
ccemux.attach(k, v.type, v.args)
end
end
_G.kernel.hook('clipboard_copy', function(_, args)
local data = args[1]
if type(data) == 'table' then
local s, m = pcall(textutils.serialize, data)
data = s and m or tostring(data)
end
if data then
ccemux.setClipboard(data)
end
end)
end