Commit: 5572b929a2a39dc33cf93724a1d0ba26688039bd
Parent: e77e88d0818637839135d7de846be84494250eeb
Author: Randy Palamar
Date: Thu, 24 Oct 2024 19:54:29 -0600
don't clobber CURSOR_WRAP_NEXT with cursor clear CSI
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/terminal.c b/terminal.c
@@ -250,7 +250,6 @@ cursor_reset(Term *t)
t->cursor.style.fg = g_colours.data[g_colours.fgidx];
t->cursor.style.bg = g_colours.data[g_colours.bgidx];
t->cursor.style.attr = ATTR_NULL;
- t->cursor.state = CURSOR_NORMAL;
}
static void
@@ -342,6 +341,7 @@ static void
term_reset(Term *t)
{
i32 mode = t->mode & TM_ALTSCREEN;
+ t->cursor.state = CURSOR_NORMAL;
for (u32 i = 0; i < ARRAY_COUNT(t->saved_cursors); i++) {
cursor_reset(t);
cursor_move_to(t, 0, 0);
diff --git a/vtgl.c b/vtgl.c
@@ -779,6 +779,7 @@ DEBUG_EXPORT iv2
init_term(Term *t, Arena *a, iv2 cells)
{
init_fonts(&t->fa, a, t->gl.glyph_bitmap_dim);
+ t->cursor.state = CURSOR_NORMAL;
for (u32 i = 0; i < ARRAY_COUNT(t->saved_cursors); i++) {
cursor_reset(t);
cursor_move_to(t, 0, 0);