summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua20
1 files changed, 1 insertions, 19 deletions
diff --git a/init.lua b/init.lua
index e4e5240..6058c9d 100644
--- a/init.lua
+++ b/init.lua
@@ -53,22 +53,6 @@ local function subscribe(ext, name, handler)
end
end
-local function wrap_plain(text, width)
- width = math.max(1, width or 1)
- local lines, from = {}, 1
- while #text - from + 1 > width do
- local window = text:sub(from, from + width - 1)
- local cut = window:match("^.*() ") or width
- lines[#lines + 1] = text:sub(from, from + cut - 1):gsub("%s+$", "")
- from = from + cut
- while from <= #text and text:sub(from, from) == " " do
- from = from + 1
- end
- end
- lines[#lines + 1] = text:sub(from)
- return lines
-end
-
local function install_header(ext, profiles, workflows)
local profile_names, workflow_names = {}, {}
for _, profile in ipairs(profiles.list) do
@@ -91,9 +75,7 @@ local function install_header(ext, profiles, workflows)
{ "workflows", workflow_names },
}) do
local value = #inventory[2] == 0 and "(none)" or table.concat(inventory[2], ", ")
- for _, line in ipairs(wrap_plain(" " .. inventory[1] .. ": " .. value, width)) do
- extras[#extras + 1] = DIM .. line .. RESET
- end
+ extras[#extras + 1] = DIM .. " " .. inventory[1] .. ": " .. value .. RESET
end
local at = (#lines > 0 and lines[#lines] == "") and #lines or (#lines + 1)
for index = #extras, 1, -1 do