termptyops (termpty_cursor_copy): copy entire "cursor_state"

pull/4/head
Koichi Murase 2 years ago
parent a3f9887ee4
commit a0a2238272
  1. 6
      src/bin/termptyops.c

@ -479,14 +479,12 @@ termpty_cursor_copy(Termpty *ty, Eina_Bool save)
{
if (save)
{
ty->cursor_save[ty->altbuf].cx = ty->cursor_state.cx;
ty->cursor_save[ty->altbuf].cy = ty->cursor_state.cy;
ty->cursor_save[ty->altbuf] = ty->cursor_state;
}
else
{
ty->cursor_state.cx = ty->cursor_save[ty->altbuf].cx;
ty->cursor_state = ty->cursor_save[ty->altbuf];
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w);
ty->cursor_state.cy = ty->cursor_save[ty->altbuf].cy;
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h);
}
}

Loading…
Cancel
Save