diff options
Diffstat (limited to 'apps/plugins/lua/include_lua/print.lua')
-rw-r--r-- | apps/plugins/lua/include_lua/print.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/plugins/lua/include_lua/print.lua b/apps/plugins/lua/include_lua/print.lua index 3b4c389848..6f2010422a 100644 --- a/apps/plugins/lua/include_lua/print.lua +++ b/apps/plugins/lua/include_lua/print.lua | |||
@@ -343,20 +343,15 @@ local _print = {} do | |||
343 | tld.line_end_color = line_end_color | 343 | tld.line_end_color = line_end_color |
344 | end | 344 | end |
345 | 345 | ||
346 | line_separator = ld.line_separator | 346 | line_separator = ld.line_separator or o.drawsep |
347 | 347 | local indent = line_indent < 0 and 0 or line_indent --rb scroller doesn't like negative offset! | |
348 | if o.line == 1 and o.header then | 348 | if o.line == 1 and o.header then |
349 | --rb scroller doesn't like negative offset! | ||
350 | local indent = line_indent < 0 and 0 or line_indent | ||
351 | set_desc(ld, true, 1, false, rb.STYLE_DEFAULT, | 349 | set_desc(ld, true, 1, false, rb.STYLE_DEFAULT, |
352 | indent, o.fg_pattern, o.bg_pattern, o.bg_pattern) | 350 | indent, o.fg_pattern, o.bg_pattern, o.bg_pattern) |
353 | ld.show_cursor = false | 351 | ld.show_cursor = false |
354 | elseif s_lines[o.line] then | 352 | elseif s_lines[o.line] then |
355 | --/* Display line selector */ | 353 | --/* Display line selector */ |
356 | local style = show_cursor == true and rb.STYLE_DEFAULT or linestyle | 354 | local style = show_cursor == true and rb.STYLE_DEFAULT or linestyle |
357 | |||
358 | local indent = line_indent < 0 and 0 or line_indent | ||
359 | --rb scroller doesn't like negative offset! | ||
360 | local ovfl = (o.ovfl == "auto" and w >= o.width and x == 0) | 355 | local ovfl = (o.ovfl == "auto" and w >= o.width and x == 0) |
361 | set_desc(ld, ovfl, 0, true, style, indent, | 356 | set_desc(ld, ovfl, 0, true, style, indent, |
362 | o.bg_pattern, o.sel_pattern, o.sel_pattern) | 357 | o.bg_pattern, o.sel_pattern, o.sel_pattern) |
@@ -377,7 +372,9 @@ local _print = {} do | |||
377 | if ld.selected == true then | 372 | if ld.selected == true then |
378 | rb.set_viewport(o) -- revert drawmode if selected | 373 | rb.set_viewport(o) -- revert drawmode if selected |
379 | end | 374 | end |
380 | rb.lcd_drawline(0, line * h, o.width, line * h) | 375 | if not o.header then |
376 | rb.lcd_drawline(0, line * h, o.width, line * h) | ||
377 | end | ||
381 | rb.lcd_drawline(0, line * h + h, o.width, line * h + h) --only to add the last line | 378 | rb.lcd_drawline(0, line * h + h, o.width, line * h + h) --only to add the last line |
382 | -- but we don't have an idea which line is the last line here so every line is the last line! | 379 | -- but we don't have an idea which line is the last line here so every line is the last line! |
383 | end | 380 | end |
@@ -457,6 +454,7 @@ local _print = {} do | |||
457 | _print.opt.line = set_line | 454 | _print.opt.line = set_line |
458 | _print.opt.linedesc = set_linedesc | 455 | _print.opt.linedesc = set_linedesc |
459 | _print.opt.autoupdate = set_update | 456 | _print.opt.autoupdate = set_update |
457 | _print.selected = function() return s_lines end | ||
460 | _print.clear = clear | 458 | _print.clear = clear |
461 | _print.f = printf | 459 | _print.f = printf |
462 | 460 | ||