Commit 485b1869 authored by Cédric VALENSI's avatar Cédric VALENSI

Sync

parent eaa8aa10
......@@ -52,7 +52,8 @@ end
local function __display_header_box (_obj, text, c, lvl)
local x = maqao_get_term_size()
if x <= 0 then
if x <= 0
or x > 200 then
x = _DEFAULT_WIDTH
end
local str_line = "+"..string.rep (c, x - 2).."+"
......@@ -92,7 +93,8 @@ end
local function __display_header_line (_obj, text, c, bold, lvl)
local x = maqao_get_term_size()
if x <= 0 then
if x <= 0
or x > 200 then
x = _DEFAULT_WIDTH
end
local str_line = " "..string.rep (c, x - 12)
......@@ -212,7 +214,8 @@ function TEXT:display_table (header, data, sizes)
local sum_x_header = 2
local sum_x_sizes = 0
if max_x <= 0 then
if max_x <= 0
or max_x > 200 then
max_x = _DEFAULT_WIDTH
end
......@@ -352,7 +355,8 @@ end
-- @param text Some text to display
function TEXT:display_text (text)
local max_x = maqao_get_term_size()
if max_x <= 0 then
if max_x <= 0
or max_x > 200 then
max_x = _DEFAULT_WIDTH
end
local text2 = adapt_text_length (text, max_x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment