|
|
@ -155,9 +155,13 @@ function M.prepare_for_render(items, opts)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if #ts_report > 1 then
|
|
|
|
if #ts_report > 1 then
|
|
|
|
space, trim = get_pads(win_width, item.text, ts_report)
|
|
|
|
space, trim = get_pads(win_width, item.text, ts_report)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local l = math.max(20, opts.width - math.min(20, #ts_report))
|
|
|
|
|
|
|
|
if trim and #item.text < l then
|
|
|
|
|
|
|
|
trim = false
|
|
|
|
|
|
|
|
end
|
|
|
|
if trim then
|
|
|
|
if trim then
|
|
|
|
local ts_r = ts_report or ''
|
|
|
|
item.text = string.sub(item.text, 1, l)
|
|
|
|
item.text = string.sub(item.text, 1, math.max(1, opts.width - math.max(20, #ts_r)))
|
|
|
|
|
|
|
|
local _, j = string.gsub(item.text, [["]], '')
|
|
|
|
local _, j = string.gsub(item.text, [["]], '')
|
|
|
|
if j % 2 == 1 then
|
|
|
|
if j % 2 == 1 then
|
|
|
|
item.text = item.text .. '"'
|
|
|
|
item.text = item.text .. '"'
|
|
|
|