mirror of
https://github.com/kepler155c/opus
synced 2025-12-18 14:18:06 +00:00
generalized canvas
This commit is contained in:
@@ -2,6 +2,8 @@ local Util = require('util')
|
||||
|
||||
local Terminal = { }
|
||||
|
||||
local _sgsub = string.gsub
|
||||
|
||||
function Terminal.scrollable(ct, size)
|
||||
|
||||
local size = size or 25
|
||||
@@ -108,7 +110,10 @@ function Terminal.toGrayscale(ct)
|
||||
|
||||
local function translate(s)
|
||||
if s then
|
||||
s = s:gsub("%d+", bcolors)
|
||||
for k,v in pairs(bcolors) do
|
||||
s = _sgsub(s, k, v)
|
||||
end
|
||||
-- s = _sgsub(s, "%d+", bcolors) -- not working in cc 1.75 ???
|
||||
end
|
||||
return s
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user