perf opt
don't draw invisible chars in the Code Editor
@@ -83,6 +83,8 @@ static void drawCode(Code* code, bool withCursor)
{
char symbol = *pointer;
+ if(x >= -TIC_FONT_WIDTH && x < TIC80_WIDTH && y >= -TIC_FONT_HEIGHT && y < TIC80_HEIGHT )
+ {
if(code->cursor.selection && pointer >= selection.start && pointer < selection.end)
code->tic->api.rect(code->tic, x-1, y-1, TIC_FONT_WIDTH+1, TIC_FONT_HEIGHT+1, getConfig()->theme.code.select);
else if(getConfig()->theme.code.shadow)
@@ -91,6 +93,7 @@ static void drawCode(Code* code, bool withCursor)
}
code->tic->api.draw_char(code->tic, symbol, x, y, *colorPointer);
+ }
if(code->cursor.position == pointer)
cursor.x = x, cursor.y = y, cursor.symbol = symbol;
