CC: Tweaked

CC: Tweaked

57M Downloads

term.blit() (and other blits) '\n' support?

fatboychummy opened this issue ยท 1 comments

commented

Pretty much term.blit() normally, but allow support for \n.

For the colors, we could either add a 'blank' color (any color but it is just ignored) or have the \n just 'removed' from the original string after it is split, so that no extra colors need to be added

ie:

term.blit("word\nword2", "xxxxbxxxxx", "xxxxbxxxxx") -- 'blank' color added that is used as a placeholder for the \n
vs
term.blit("word\nword2", "xxxxxxxxx", "xxxxxxxxx") -- no 'blank' color added

This would allow for very quick redrawing of monitors that could increase performance of servers by reducing peripheral calls by a large amount (for those that actually end up using this, at least).

commented

The problem with any extension to the terminal API is that terminal redirects, such as the window API, must also implement it. I think the current system strikes a good balance between ease of use and efficiency - having to handle string splits makes thing much more complicated.