vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: d033316a3c556d06224fdaa491d4e41949d4f06d
Parent: 88fa76c0a0be7e7056eff429e521f83a3df2bfc2
Author: Randy Palamar
Date:   Thu, 22 Aug 2024 20:27:05 -0600

DECTCEM: flip the show/hide cursor flag

The flag is still called HIDECURSOR because we want the default
state to show the cursor.

Diffstat:
Mterminal.c | 4++--
Mvtgl.c | 4+---
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/terminal.c b/terminal.c @@ -309,8 +309,8 @@ set_mode(Term *t, CSI *csi, b32 set) /* IGNORED */ break; case PRIV(25): /* DECTCEM: Show/Hide Cursor */ - if (set) t->gl.mode |= WIN_MODE_HIDECURSOR; - else t->gl.mode &= ~WIN_MODE_HIDECURSOR; + if (!set) t->gl.mode |= WIN_MODE_HIDECURSOR; + else t->gl.mode &= ~WIN_MODE_HIDECURSOR; break; case PRIV(1049): /* xterm: swap cursor then swap screen */ cursor_alt(t, set); diff --git a/vtgl.c b/vtgl.c @@ -328,9 +328,7 @@ render_framebuffer(Term *t, RenderPushBuffer *rpb) } /* NOTE: draw cursor */ - /* TODO: hide cursor doesn't get reset properly */ - //if (!(t->gl.mode & WIN_MODE_HIDECURSOR)) - { + if (!(t->gl.mode & WIN_MODE_HIDECURSOR) && t->scroll_offset == 0) { iv2 curs = t->cursor.pos; Rect cr = { .pos = {.x = tl.x + cs.w * curs.x, .y = tl.h - cs.h * (curs.y + 1)},