Commit: 772e6da78767e7a795130b40ef9d7fc9f5ca0b94
Parent: e31764a93ca52b0212fb877560df30e6e0ce10f0
Author: Randy Palamar
Date: Sun, 29 Sep 2024 11:16:34 -0600
assert that the cursor is not on a dummy position during render
the terminal code should ensure that this never happens. we
shouldn't handle it here.
Diffstat:
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/vtgl.c b/vtgl.c
@@ -349,8 +349,8 @@ render_framebuffer(Term *t, RenderPushBuffer *rpb)
/* NOTE: do full rows first */
for (; curs.y < end.y; curs.y++) {
u32 len = t->size.w - curs.x - 1;
- push_cell_row(rpb, &t->gl, t->arena_for_frame, &t->fa, tv->fb.rows[curs.y] + curs.x, len, 1,
- cr, cell_font_delta);
+ push_cell_row(rpb, &t->gl, t->arena_for_frame, &t->fa,
+ tv->fb.rows[curs.y] + curs.x, len, 1, cr, cell_font_delta);
curs.x = 0;
cr.pos.x = tl.x;
cr.pos.y -= cs.h;
@@ -365,10 +365,8 @@ render_framebuffer(Term *t, RenderPushBuffer *rpb)
iv2 curs = t->cursor.pos;
cr.pos = (v2){.x = tl.x + cs.w * curs.x, .y = tl.h - cs.h * (curs.y + 1)};
Cell cursor = tv->fb.rows[t->cursor.pos.y][t->cursor.pos.x];
- if (cursor.style.attr & ATTR_WDUMMY) {
- cursor = tv->fb.rows[t->cursor.pos.y][t->cursor.pos.x - 1];
- ASSERT(cursor.style.attr & ATTR_WIDE);
- }
+
+ ASSERT(!(cursor.style.attr & ATTR_WDUMMY));
if (cursor.style.attr & ATTR_WIDE)
cr.size.w *= 2;
cursor.style.attr ^= ATTR_INVERSE;